Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Anchor
jsondata
jsondata
JSON Data Request

Request

Code Block
http://localhost/Astun.iShareMaps.web/getdata.aspx?requesttype=json&Type=data&ds=CrimeSummary&select=district,neighbourhood&filter=^month^='Jul-07'^&order=datetime


Code Block
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

 


Anchor
xsldata
xsldata
XSL Data Request

Request

Code Block
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

Anchor
xsldatafunc
xsldatafunc
XSL DataFunc Request

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

Request

Code Block
titleType=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


Code Block
titleType=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