BellaDati Technical Documentation : GET KPI View

/api/reports/views/:id/kpi

This method returns data and metadata of specified KPI view.

Resource Information

Parameters

Parameters

Detail

id

ID of the KPI view. This ID is a part of the /api/reports/:id response.
Example: 1234

filter

Filter used in the KPI.

{
  "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 time definition used in the KPI.

{
        "dateInterval": {
               "interval": {
                       "from":{"year":"2014","month":"1","day":"22"},
                       "to":{"year":"2014","month":"1","day":"25"},
                       "type": "absolute"
               },
               "aggregationType": "DAY"
        }
}

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/88738/kpi

The JSON format response:

{
  "values": [
    {
      "numberValue": "86 %",
      "caption": "Success Rate"
    }
  ]
}