balance

Determine your credit balance or DPU balance.

An HTTPS GET request sent to:

https://api.datasift.com/v1.6/balance

A successful call to this endpoint returns: 200 OK plus a JSON object.

Examples

Here's an example of a call to /v1.6/balance.

curl -X GET https://api.datasift.com/v1.6/balance
  -H 'Authorization: datasift-user:your-datasift-api-key'

The returned JSON object has this form:

{
  "balance": {
    "plan": "subscription",
    "threshold": 20000,
    "allowances": [
      {
        "name": "DPU Usage Plan",
        "categories": [
          "realtime",
          "managed_sources",
          "historics",
          "historicpreview"
        ],
        "cost": 0,
        "allowance": 100000,
        "remaining": 71030.16,
        "usage": 28969.84
      },
      {
        "name": "BoardReader allowance",
        "categories": [],
        "cost": 0,
        "allowance": 200000,
        "remaining": 100000,
        "usage": 100000
      }
    ]
  }
}

Property: Description:
name The subscription or feature the balance relates to.
categories For DPU usage plans only, the products on which you can spend the DPU allowance.
cost The cost of the subscription or feature, plus if you exceed your allowance the additional cost you have incurred so far this month.
allowance Your monthly allowance for the subscription or feature.
remaining Your remaining allowance for the subscription or feature for the current month.
usage The allowance you have consumed for the subscription or feature in the current month.

Examples using API v1.4 or earlier:

Here's an example of a call to /v1.4/balance.

curl -X GET https://api.datasift.com/v1.4/balance
  -H 'Authorization: datasift-user:your-datasift-api-key'

The returned JSON object has this form:

{
  "balance": {
    "remaining_dpus": 22060.3,
    "cost": 0,
    "plan": "subscription",
    "threshold": 20000
  }
}

Property: Description:
cost The license cost for your data plus, if your remaining_dpus falls to zero and you continue to run streams, the additional DPU cost you have incurred so far this month.
remaining_dpus The DPUs remaining on this plan for the current month.

Notes

  1. All calls to the API must be properly authenticated with a DataSift username and API key.
  2. All calls to the API must be versioned. The current version is v1.6.

Revision history

v1.5

From v1.5 the balance endpoint was extended to return balance information for all subscriptions and features. Previously the endpoint had only returned balance details for your main DPU Usage Plan.

v1.6

In v1.6 the output fields dpu_allowance and remaining_dpus were renamed to allowance and remaining as not all subscriptions and features are charged in DPUs.

Resource information

Rate limit cost: 25

Requires authentication: Yes

Response formats: JSON, JSONP