Data Share Data Request

You can use the getdata.aspx to request data from your Data Share database. The getdata.aspx may be found in the web subfolder e.g. http://custom.astun.local/mycouncil/web/getdata.aspx?. There are different Data Request types:

  1. JSON Data Request
  2. XSL Data Request
  3. XSL DataFunc Request

JSON Data Request

Request

http://localhost/Astun.iShareMaps.web/getdata.aspx?requesttype=json&Type=data&ds=CrimeSummary&select=district,neighbourhood&filter=^month^='Jul-07'^&order=datetime
http://localhost/Astun.iShareMaps.web/GetData.aspx?requesttype=json&Type=data&ds=all&select=field1,field2,field3,field4&filter=^field1^='x'^,^field2^='y'^&order=field3

Parameters

Parameter

Definition

Required

RequestType

JSON

YES

Type

Data

YES

ds

Data Source Name [DSN] as configured in Studio Data Share Connections

YES

select

Field names to be returned; comma separated. These field names must exist in the list of Available / View Fields for your DSN.

e.g district,neighbourhood

Note: If you don't specify this parameter then ALL available fields will be returned not just those selected for display in Studio.

NO

filter

Filter criteria composed of ^field name^ followed by criteria which can be - IN, >, =, between, etc.

e.g ^crimes_total^> 40

NO

order

Field name to order the results by

NO

XSL Data Request

Request

http://localhost/astun.isharemaps.web/getdata.aspx?requesttype=xsl&Type=data&ds=CrimeSummary&select=month,burglary,crimes_total,violence_against_the_person,burglary,robbery,vehicle_crime,other_crimes&filter=^datetime^between%20'2008-08-01'%20and%20'2008-10-31'^,^neighbourhood^='Ayresome%20Ward'&xsl=xml/atHTMLDivDatatable.xsl

Parameters

Parameter

Definition

Required

RequestType

XSL

YES

Type

Data

YES

ds

Data Source Name as configured in Studio Data Share Connections

YES

select

Field names to be returned; comma separated. These field names must exist in the list of Available / View Fields for your DSN.

e.g district,neighbourhood,crimes_total

Note: If you don't specify this parameter then ALL available fields will be returned not just those selected for display in Studio.

NO

filter

Filter criteria composed of ^field name^ followed by criteria which can be - IN, >, =, between, etc.

e.g ^crimes_total^> 40

NO

order

Field name to order the results by

NO

xsl

Style sheet for the returned results

NO

XSL DataFunc Request

This performs a data request using an Internal Function Data Share connection.

Request

Type=JSONP
http://localhost/astun.isharemaps.web/getdata.aspx?callback=somejsfunction&RequestType=xsl&Type=jsonp&service=DataFunc&xsl=xml/atJSONDatatable.xsl&ds=NearestAddress&params=487071~233471~5000~1


Type=DataFunc
http://localhost/astun.isharemaps.web/getdata.aspx?type=datafunc&ds=GetBinCalendarDates&RequestType=XSL&xsl=xml/getbindates/st_getbindates.xsl&params=10000029475

Parameters

Parameter

Definition

Required

RequestType

XSL

YES

Type

DataFunc or JSONP

YES

ServiceDataFunc - only required for TYPE=JSONPConditional

ds

Internal Function Data Source Name as configured in Studio Data Share Connections

YES

xsl

Style sheet for the returned results

NO

params

Here you need to specify the parameters that are required for your Internal Function Data Share connection

NO