PUT /account/identity/{identity_id}/limit/{service}

Update service limits set for an identity.

An HTTPS PUT request sent to:

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

If the identity had no limits set before the call, a successful call to the endpoint will return 201 Created plus a JSON object, signifying limits have been created.

If the identity already had limit(s) set before the call, a successful call to the endpoint will return 200 OK plus a JSON object, signifying the limits have been updated.

Parameters

Parameter Description
total_allowance
optional

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

analyze_queries
optional

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

Examples

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

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

    The output looks like this:

    HTTP/1.1 200 OK
    Content-type: application/json
    
    {
        "identity_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
201 Created

Limits were successully created for the identity.

{
  { 
    "id": "b56c71940dda05ef126c121220918036", 
    "service": "facebook", 
    "total_allowance": 2000 
  }
}
Status 200 OK

Limits were successully updated for the identity.

{
  { 
    "id": "b56c71940dda05ef126c121220918036", 
    "service": "facebook", 
    "total_allowance": 2000 
  }
}
Status 404 Not Found
{
   "error": "An Identity with the supplied id was not found"
}
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