POST /account/identity/{identity_id}/limit

Set new service limits for an identity.

An HTTPS POST request sent to:

https://api.datasift.com/v1.3/account/identity/{identity_id}/limit

A successful call to this endpoint returns: 201 Created plus a JSON object.

Parameters

Parameter Description
service
required

The service for which you want to create the limit.

analyze_queries
optional

The number of analysis queries per hour this identity is allowed to submit.

total_allowance
optional

The number of interactions per day this identity is allowed to store for this service.

Examples

  1. For the identity with id 1234567890abcdef1234567890abcdef, for the Facebook service, set a daily recording limit of 50,000 and hourly analyze query limit of 100:

    curl -X POST https://api.datasift.com/v1.3/account/identity/1234567890abcdef1234567890abcdef/limit \
        -d '{"service": "facebook", "total_allowance": 50000, "analyze_queries": 100}' \
        -H 'Content-type: application/json' \
        -H 'Authorization: username:api_key'

    The output looks like this:

    HTTP/1.1 201 Created
    Content-type: application/json
    
    {
        "id": "1234567890abcdef1234567890abcdef",
        "service": "facebook",
        "total_allowance": 50000,
        "analyze_queries": 100
    }

Output Fields

Property Type Description
identity_id string The id of the identity.
service string The service these limits apply to.
total_allowance int The daily recording limit set for the identity for this service.
analyze_queries int The hourly analyze query limit set for the identity for this service

Responses

Response code Description
Status 201 Created

The call was successful.

{
  "id": "1234567890abcdef1234567890abcdef",
  "service": "facebook",
  "total_allowance": 50000,
  "analyze_queries": 100
}
Status 404 Not Found
{
    "error": "An Identity with the supplied id was not found"
}
Status 409 Conflict
{
    "error": "A limit for <service> already exists for that Identity"
}
Status 410 Gone
{
    "error": "The Identity with the supplied id has been deleted"
}

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.3.
  3. All POST and PUT requests require Content-type: application/json.

Resource information

Rate limit cost: 25

Requires authentication: Yes

Response formats: JSON, JSONP