You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

/api/reports/views/:id/map

This method returns data and metadata of specified map.

Resource Information

Parameters

Parameters

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 KPI with following structure:

Name
Description
drilldown

Drilldown defined with attribute code and following structure:

Name
Description
opFilter operation type - please see list of supported values.
value/values(Optional) Depends on selected "op". Contains value or values for filter.


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

dateTimeDefinition

Date and time definition used in the KPI with following structure:

NameDescription
dateInterval

(Optional) Date interval to filter values. Has following structure:

Name
Description
aggregatedBoolean flag indicating if values are aggregated.
aggregationTypeDate interval period - please see list of supported values.
interval

Interval definition with following structure:

Name
Description
typeInterval type - please see list of supported values.
fromInterval start value
toInterval end value
timeInterval

(Optional) Time interval to filter values. Has following structure:

Name
Description
aggregationTypeTime interval period - please see list of supported values.
interval

Interval definition with following structure:

Name
Description
typeInterval type - please see list of supported values.
fromInterval start value
toInterval end value


 

{
  "dateInterval": {
      "interval": {
          "from":{"year":"2014","month":"1","day":"22"},
          "to":{"year":"2014","month":"1","day":"25"},
          "type": "absolute"
      },
      "aggregationType": "DAY"
  },
  "timeInterval": {
      "interval": {
          "from":{"hour":"14","minute":"15","second":"16"},
          "to":{"hour":"20","minute":"0","second":"0"},
          "type": "absolute"
      },
      "aggregationType": "SECOND"
  }
}

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\"" https://service.belladati.com/api/reports/views/1234/map

The JSON format response (points):

{
  "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"
    }
  }
}
  • No labels