/api/dataSets/:id/data
Loads dataset data.
Resource Information
Resource URL | |
---|---|
HTTP Method |
|
Request Parameters
Parameters | Detail | Example |
---|---|---|
id (path parameter) | ID of the data set to fetch. You can find the ID in the response to /api/dataSets . | 123 |
joinPoints | Definition of join points to be used for loading the data. Available join types:
| joinPoints={"joins"=[ |
| (Optional) Filter used to load data. Prefix (PT) can be used when join contains columns with the same names. See the complete list of Filter operation types. conditionType (optional) is used to define condition operator between conditions. Available values:
Searching part of String: use '%' wildcard to search selected String in data set values. E.g. "value": "%al%" In order to join multiple filters or apply two filters on the same parameter, attribute drilldown can be an array. "conditionType" attribute outside "drilldown" defines condition between drilldown array members and "conditionType" attribute inside drilldown member defines condition between attributes in the drilldown. | { "drilldown": { "L_COUNTRY_OR_AREA": { "op": "EQ", "value": "Slovakia" }, "L_TYPE": { "op": "IN", "values": [ "Type 1", "Type 2", "Type 3" ] }, "PT.L_DATE": { "op": "NOT_NULL" },
|
| (Optional) Specifies the page offset if pagination is necessary. | 2 |
| (Optional) Specifies the number of entries on each page if pagination is necessary. | 15 |
order (query parameter) | (Optional) Specifies the sorting order of the listed data | M_INDICATOR asc |
Response Structure
{ "dataSet" : { ... }, "data" : [ { "UID" : 123456, "L_ATTRIBUTE" : "value", "M_INDICATOR" : 11.99 }, { "UID" : 123457, "L_ATTRIBUTE" : "value2", "M_INDICATOR" : 22.08 } ], "offset" : 0, "size" : 2 }
JSON response contains 2 pagination elements (offset and size) but the main 2 elements are dataSet that contains detailed information about data set (see GET Data Set Detail) and data which contains array of data rows in following structure:
Name | Description |
---|---|
UID | Unique ID of data row. |
L_* | Attribute values contained in the data row. |
M_* | Indicator values contained in the data row. |
Sample Request / Response
Using curl
:
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" https://service.belladati.com/api/dataSets/123/data
The JSON format response:
{ "dataSet" : { "id" : 123, "name" : "My test data set", "code" : "DATASET_CODE", "localization" : { "de" : "Deutsch Name" }, "description" : "This is a sample data set.", "owner" : "John Smith", "lastChange" : "Tue, 22 May 2012 17:16:31 GMT", "data" : [ { "UID" : 123456, "L_ATTRIBUTE" : "value", "M_INDICATOR" : 11.99 }, { "UID" : 123457, "L_ATTRIBUTE" : "value2", "M_INDICATOR" : 22.08 } ], "offset" : 0, "size" : 2, "parameters": [ { "param1": "value1" }, { "param2": "value2" } ] }