This client API will return XLS file of selected table view. Drilldown can be specified to obtain required informations
Resource URL | https://service.belladati.com/bi/report/api:exportXls/:id |
HTTP Method | GET
|
Request Parameters
Parameters | 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: Name | Description |
---|
drilldown | Drilldown defined with attribute code and following structure: Name | Description |
---|
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 |
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" ]
},
"L_DATE" : {
"op" : "NOT_NULL"
},
"L_PRODUCT" :{
"op" : "COUNT" ,
"countOp" : "LTE" ,
"value" : "816"
}
}
}
Example of a between filter:
{ "drilldown" :[{ "L_ID" :{ "op" : "GT" , "value" : "10" }},{ "L_ID" :{ "op" : "LT" , "value" : "20" }}]}
|
|
drilldownConfig | (Optional) Replaces the table drill-down with custom configuration. Both horizontal and vertical drill-down configurations can be replaced. Each configuration is an array with the following elements: Name | Description |
---|
vertical | Definition of header that should be set (vertical header) | horizontal | Definition of header that should be set (horizontal header) | dataSetDrilldownAttribute | Code of the attribute (e.g. L_CITY) | dataSetDrilldownAttributeSubset | (Optional) ID of the used subset | hideDataSetCustomMembers | Defines whether custom members will be displayed | limit | Sets limit for members displayed in the selected drill-down. Set this value to "ALL" if all available members should be loaded. |
| {
"horizontal" :[
{
"dataSetDrilldownAttribute" : "L_PRODUCT_TYPE" ,
"hideDataSetCustomMembers" : false ,
"limit" : "ALL"
},
{
"dataSetDrilldownAttribute" : "L_PRODUCT" ,
"dataSetDrilldownAttributeSubset" : "TdPgywXkmB" ,
"hideDataSetCustomMembers" : true ,
"limit" : 1000
}
],
"vertical" :[
{
"dataSetDrilldownAttribute" : "L_DATE" ,
"dataSetDrilldownAttributeSubset" : "0EE39yrVHY" ,
"hideDataSetCustomMembers" : false
}
]
}
|
|
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\""
/bi/report/api:exportXls/1253-qZtfWw8bgL?drilldownConfig=%7B%22vertical%22%3A%5B%7B%22dataSetDrilldownAttribute%22%3A%22L_DATA%22%7D%2C%7B%22dataSetDrilldownAttribute%22%3A%22L_SUBDATA%22%7D%5D%7D&filter=%7B%22drilldown%22%3A%5B%7BL_SUBDATA%3A%7B%22op%22%3A%20%22EQ%22%2C%20%22value%22%3A%20%22sub2%22%7D%7D%5D%7D
|