Skip to main content

Account Analytics

Arkhia's analytics API service allows you to fetch API usage analytics for their active projects. The key goal of the analytics API is to give you an insight of your API usage across Arkhia's suite of services.

info

Arkhia Analytics API is available only for Starter tiers and above.

You will need:

Fetching Analytics

const axios = require('axios');let config = {    method: 'get',    maxBodyLength: Infinity,    url: 'http://api.arkhia.io/analytics/breakdown/<YOUR_API_KEY>',    headers: {         'x-api-secret': '<YOUR_API_SECRET>',    }};axios.request(config).then((response) => {    console.log(JSON.stringify(response.data));}).catch((error) => {    console.log(error);});

Response Objects

  • Successful response:

    Status Code: 200

    {"status": true,"response": {    "cycleStartDate": <Start Date of the current subscription cycle>, // UTC timestamp in UNIX format    "cycleEndDate": <End Date of the current subscription cycle>, // // UTC timestamp in UNIX format    "callsUsed": <Total calls used across projects in this cycle>, // number    "callsAvailable": <Total calls available across projects in this cycle> // number    "percentageCallsUsed": <Percentage calls used across projects in this cycle> // number}}