/api/reports/views/:id/mapThis method returns data and metadata of specified map. Request ParametersParameters | Detail | Example |
---|
id
| ID of the map view. This ID is a part of the /api/reports/:id response. | 1234 | filter
| (Optional) Filter used in the map 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"
}
}
} |
| dateTimeDefinition
| (Optional) Date and time definition used in the map with following structure: Name | Description |
---|
dateInterval | (Optional) Date interval to filter values. Has following structure: | |
---|
aggregationType | Date interval period - please see list of supported values. | interval | Interval definition with following structure: |
| timeInterval | (Optional) Time interval to filter values. Has following structure: | |
---|
aggregationType | Time interval period - please see list of supported values. | interval | Interval definition with following structure: |
|
| Code Block |
---|
{
"dateInterval": {
"interval": {
"from": "actualYear-1y",
"to": "actualYear-1d",
"type": "custom"
},
"aggregationType": "DAY"
},
"timeInterval": {
"interval": {
"from":{"hour":"14","minute":"15","second":"16"},
"to":{"hour":"20","minute":"0","second":"0"},
"type": "absolute"
},
"aggregationType": "SECOND"
}
} |
|
Response StructureJSON response contains one JSON object. The response is different for point-based map and for shaped-base map. Point-based mapName | Description |
---|
content.options | Configuration of the map Name | Description |
---|
indicator | Name of the used indicator | color | Color of the indicator in HEX format |
| content.points | Array of GEO points where each point has following structure: Name | Description |
---|
latitude | Latitude of the GEO point | longitude | Longitude of the GEO point | properties | Name | Description |
---|
backgroundColor | Background color | color | Color of the text | name | Name of the point | context.dataLink | Unique identifier of the context element | context.indentifierQuery | Query used to display the value for this point (e.g."[L_COUNTRY_NAME={Albania}]" | caption | Caption of the point | value | Value of the indicator | ration | Size of the point |
|
|
Shape-based mapName | Description |
---|
content.options | Configuration of the map Name | Description |
---|
indicator | Name of the used indicator | grades | Array of colors used in the map. Each grade has following properties: Name | Description |
---|
Color | Color of the shape (HEX format) | From | Minimum value of the interval | To | Maximum value of the interval |
|
| content.shapes.features | Array of GEO shapes where each shape has following structure: Name | Description |
---|
geometry | Array of coordinates which define the shape. | type | "Feature" | properties | Name | Description |
---|
color | Color of the text | name | Name of the point | context.dataLink | Unique identifier of the context element | context.indentifierQuery | Query used to display the value for this point (e.g."[L_COUNTRY_NAME={Albania}]" | caption | Caption of the point | value | Value of the indicator |
|
|
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/map
|
The JSON format response (points): Code Block |
---|
| {
"title": "<div class=\"cleverTitle\"><\/div>"
"content": {
"points" : [
{
"longitude" : 45,
"latitude" : 40,
"properties" : {
"ratio" : 0.6323828313278139,
"name" : "Armenia",
"value" : "-7,142,253,000",
"context" : {
"identifierQuery" : "[L_COUNTRY_OR_AREA={Armenia}]",
"dataLink" : "1_1097087486"
}
}
},
{
"longitude" : 133,
"latitude" : -27,
"properties" : {
"ratio" : 0,
"name" : "Australia",
"value" : "-132,579,546,390",
"context" : {
"identifierQuery" : "[L_COUNTRY_OR_AREA={Australia}]",
"dataLink" : "1_-2097652575"
}
}
}
],
"options" : {
"indicator" : "Value",
"color" : "#4379bd"
}
}
}
|
|