Usage API

The Usage API is a free REST API that provides programmatic access and visibility into activity consumption across products for your account. It is the most important and best tool for helping to monitor and manage usage across the different APIs under your account.

Get usage data

GET /v1/usage

Retrieves the usage data for the current month. The data section contains number of requests for each service.

Arguments

None

Returns

This call returns an API usage object, and returns an error otherwise.

Example request

curl https://api.objectia.com/v1/usage \
      -H "Authorization: Bearer YOUR-API-KEY" \ 
      -H "Accept: application/json"

JSON Response

{
  "data": {
    "geoip_requests": 5490,
    "mail_requests": 9023
  },
  "status": 200,
  "success": true
}

XML response:

<result>
  <data>
    <geoip_requests>5490</geoip_requests>
    <mail_requests>9023</mail_requests>
  </data>
  <status>200</status>
  <success>true</success>
</result>