/api/reports/:id/filter/drilldownAttributeValues?code=:code&filter=:filterLists members for provided attribute. Request ParametersParameters | Detail | Example |
---|
id | ID of the report to fetch. You can find the ID in the response to /api/reports . | 123 | code | (Query parameter) The code of the attribute. | L_CITY | filter | (Query parameter, Optional) If set, the result only contains attribute values that contain the filter text. | Prag | selectedValues | (Query parameter, Optional) List of already selected values. | Prague, London, Seoul, Chicago |
Response Structure Code Block |
---|
| {
"values" : [ ]
} |
JSON response contains array "values" containing multiple member objects with following definition: Name | Description |
---|
value | Member value | label | Member label |
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/1/filter/drilldownAttributeValues?filter=Pr&code=L_CITY
|
The JSON format response: Code Block |
---|
| {
"values" : [
{
"value" : "Prague",
"label" : "Prague",
}
]
}
|
Let's have a report with list of countries and use following request: Code Block |
---|
https://service.belladati.com/api/reports/3295/filter/drilldownAttributeValues?filter=Rep&code=L_COUNTRY_NAME_EN |
This will return the following countries: Czech Republic, Dominican Republic, Georgia Republic, Republic of the Congo.
If the parameter "selectedValues" is added like this: Code Block |
---|
https://service.belladati.com/api/reports/3295/filter/drilldownAttributeValues?filter=Rep&code=L_COUNTRY_NAME_EN&selectedValues=Czech Republic |
Following countries will be returned: Dominican Republic, Georgia Republic, Republic of the Congo.
To use more values, you have to add the parameter multiple times: Code Block |
---|
https://service.belladati.com/api/reports/3295/filter/drilldownAttributeValues?filter=Rep&code=L_COUNTRY_NAME_EN&selectedValues=Czech Republic&selectedValues=Dominican Republic |
Following countries will be returned: Georgia Republic, Republic of the Congo. |