Launch Podkite Dashboard

POST load

Load data with a query


Returns

The queried data.

Endpoint

[POST] https://api.podkite.com/v1/data/load/

cURL

curl --location --request POST 'https://api.podkite.com/v1/data/load/' \
--header 'x-api-key: MY_GATEWAY_API_KEY' \
--data-raw '{
    "query": {"measures":["KitelinksBasicAnalytics.linkViewCount"]}
}'

Python

import requests

url = "https://api.podkite.com/v1/data/load/"

payload = "{\"query\": {\"measures\":[\"KitelinksBasicAnalytics.linkViewCount\"]}}"
headers = {
  'x-api-key': 'MY_GATEWAY_API_KEY'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

NodeJs

const axios = require('axios');
const query = '{"query": {"measures":["KitelinksBasicAnalytics.linkViewCount"]}}';

const config = {
  method: 'post',
  url: 'https://api.podkite.com/v1/data/load/',
  headers: { 
    'x-api-key': 'MY_GATEWAY_API_KEY'
  },
  data : query
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Example Response

{
    "query": {
        "measures": [
            "KitelinksBasicAnalytics.linkViewCount"
        ],
        "timezone": "UTC",
        "order": [],
        "filters": [
            {
                "member": "KitelinksBasicAnalytics.link",
                "operator": "equals",
                "values": [
                    "pk-oop",
                    "pk-example"
                ]
            }
        ],
        "dimensions": [],
        "timeDimensions": []
    },
    "data": [
        {
            "KitelinksBasicAnalytics.linkViewCount": "1334"
        }
    ],
    "lastRefreshTime": "2022-07-08T00:37:21.000Z",
    "annotation": {
        "measures": {
            "KitelinksBasicAnalytics.linkViewCount": {
                "title": "Kitelinks Basic Analytics Views",
                "shortTitle": "Views",
                "type": "number",
                "drillMembers": [],
                "drillMembersGrouped": {
                    "measures": [],
                    "dimensions": []
                }
            }
        },
        "dimensions": {},
        "segments": {},
        "timeDimensions": {}
    },
    "slowQuery": false,
    "total": null
}