Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

/api/dataSets/:id/data

Loads dataset data.

Resource Information

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:

  • LEFT_OUTER_JOIN
  • INNER_JOIN
  • CROSS_JOIN
joinPoints={"joins"=[

{"joinedDataSetId":"198", "primaryAttribute": "L_ID", "joinedAttribute":"L_ID_JOINED", "alias":"th", "joinType": "INNER_JOIN"}

]}

filter

(query parameter)

(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:

  • AND (default)
  • OR

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": {

"UID": {
"op":"IN",
"values":["1","2","4","10"]
}, "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" },
"conditionType":"OR" } }

Example of a between filter:
{"drilldown":[{"L_ID":{"op":"GT","value":"10"}},{"L_ID":{"op":"LT","value":"20"}}]}

offset (query parameter)

(Optional) Specifies the page offset if pagination is necessary.

2

size (query parameter)

(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 dataM_INDICATOR asc

Response Structure

Code Block
languagejs
{
  "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:

NameDescription
UIDUnique ID of data row.
L_*Attribute values contained in the data row.
M_*Indicator values contained in the data row.

Join Data Sets

Note

Available since BellaDati 2.9.19

In Join Data Sets, prefix indicates the source Data Set of duplicated attributes or indicators, e.g. DATASETCODE_L_ATTRIBUTE

Sample Request / Response

Using curl:

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

Code Block
javascript
javascript
{
  "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"
      }
    ]
}



Sv translation
languageja

/api/dataSets/:id/data

データセットデータをロードします。

リソース情報

リソースURL

https://service.belladati.com/api/dataSets/:id/data

HTTPメソッド

GET

リクエストパラメーター

パラメーター

詳細

id 
(path parameter)
フェッチするデータセットのID。 IDは、/api/dataSetsへのレスポンスで見つけることができます。123
joinPoints

データのロードに使用される結合ポイントの定義。

使用可能な結合タイプ:

  • LEFT_OUTER_JOIN
  • INNER_JOIN
  • CROSS_JOIN
joinPoints={"joins"=[

{"joinedDataSetId":"198", "primaryAttribute": "L_ID", "joinedAttribute":"L_ID_JOINED", "alias":"th", "joinType": "INNER_JOIN"}

]}

filter

(query parameter)

(オプション) 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:

  • AND (default)
  • OR

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": {

"UID": {
"op":"IN",
"values":["1","2","4","10"]
}, "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" },
"conditionType":"OR" } }

Example of a between filter:
{"drilldown":[{"L_ID":{"op":"GT","value":"10"}},{"L_ID":{"op":"LT","value":"20"}}]}

offset (query parameter)

(オプション) Specifies the page offset if pagination is necessary.

2

size (query parameter)

(オプション) Specifies the number of entries on each page if pagination is necessary.

15
order (query parameter)
(オプション) Specifies the sorting order of the listed dataM_INDICATOR asc

レスポンス構造

Code Block
languagejs
{
  "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レスポンスには2つのページネーション要素 (offsetとsize) が含まれますが、主な2つの要素はデータセットに関する詳細情報を含むdataSet (GET Data Set Detailを参照)と、次の構造のデータ行の配列を含むdataです:

説明
UIDUnique ID of data row.
L_*Attribute values contained in the data row.
M_*Indicator values contained in the data row.

結合データセット

Note

BellaDati 2.9.19から利用可能です。

結合データセットでは、プレフィックスは重複した属性またはインジケータのソースデータセットを示します。 例: DATASETCODE_L_ATTRIBUTE

サンプルリクエスト/レスポンス

curl使用:

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

JSON形式のレスポンス:

Code Block
javascript
javascript
{
  "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"
      }
    ]
}