/api/reports/views/:id/table/jsonThis method returns table in JSON format. Request ParametersParameters | Detail | Example |
---|
id
| ID of the table. This ID is part of the /api/reports/:id response. | 123 | filter
| (Optional) Filter applied to the table, with following structure: | |
---|
drilldown | Drilldown defined with attribute code and following structure: | |
---|
op | Filter operation type - please see list of supported values. | value/values | (Optional) Depends on selected "op". Contains value or values for filter. | countOp | (Optional) Used with COUNT operation. Specifies the second operation used together with count. Supported values: EQ, NEQ, GT, GTE, LT, LTE |
|
|
Code Block |
---|
{
"drilldown": {
"L_COUNTRY_OR_AREA": {
"op": "EQ",
"value": "Slovakia"
},
"L_TYPE": {
"op": "IN",
"values": [ "Type 1", "Type 2", "Type 3" ]
},
"L_DATE": {
"op": "NOT_NULL"
},
"L_PRODUCT":{
"op":"COUNT",
"countOp":"LTE",
"value":"816"
}
}
} |
| drilldownConfig | (Optional) Replaces the table drill-down with custom configuration. Both horizontal and vertical drill-down configuration can be replaced. Each configuration is an array with the following elements: Name | Description |
---|
dataSetDrilldownAttribute | Code of the attribute (e.g. L_CITY) | dataSetDrilldownAttributeSubset | (Optional) ID of the used subset | hideDataSetCustomMembers | Defines whether custom members will be displayed |
|
Code Block |
---|
{
"horizontal":[
{
"dataSetDrilldownAttribute":"L_PRODUCT_TYPE",
"hideDataSetCustomMembers": false
},
{
"dataSetDrilldownAttribute":"L_PRODUCT",
"hideDataSetCustomMembers": true
}
],
"vertical":[
{
"dataSetDrilldownAttribute":"L_DATE",
"dataSetDrilldownAttributeSubset":"0EE39yrVHY",
"hideDataSetCustomMembers": false
}
]
} |
|
Response Structure Code Block |
---|
{
"rowsCount" : ...,
"name" : ...,
"header" : [ ],
"body" : [ ]
} |
JSON response contains elements with following definition: Name | Description |
---|
rowsCount | Total number of rows including headers and data | name | Table view name | header | Array containing header elements | body | Array containing data elements |
Sample request/responseUsing 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/reports/views/1234/table/json
|
The JSON format response: Code Block |
---|
{
"rowsCount" : 5,
"name" : "My Table Name",
"header" : [
[
{
"value" : "",
"type" : "header"
}
],
[
{
"value" : "",
"type" : "header"
}
]
],
"body" : [
[
{
"value" : "Value",
"type" : "header"
},
{
"style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ",
"value" : "1,033,054,533,155"
}
],
[
{
"value" : "Value Footnotes",
"type" : "header"
},
{
"style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ",
"value" : "1"
}
],
[
{
"value" : "B",
"type" : "header"
},
{
"style" : " color:rgb(77, 77, 77) !important ; background-color:rgb(237, 237, 237); ",
"value" : "5"
}
]
]
} |
Next steps |