GET /account/identity

Retrieve account identities.

To learn how to use the endpoints together take a look at our account API step-by-step page

An HTTPS GET request sent to:

https://api.datasift.com/v1.3/account/identity

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

Parameters

Parameter Description
label
optional

If label is specified, only the identity with that label is returned.

per_page
optional

Number of results to return per page.

Default: 25

page
optional

The page you want to retrieve. For example, if you set this parameter to 3, the API will return page 3 only (if there is sufficient data to fill more than 2 pages).

Default: 1

Examples

  1. Retrieve details of your account identities. The per_page parameter is set to 30 entries per page. The page parameter is not specified either so it will default to 1. If there are more than 30 results, the remainder will not be returned. To see them, you will need to make further calls to this endpoint. The count element shows the total number of results available:

curl -X GET https://api.datasift.com/v1.3/account/identity?per_page=30 
    -H 'Authorization: username:api_key'

The output looks like this:

HTTP/1.1 200 OK
{
    "count": 2,
    "page": 1,
    "pages": 1,
    "per_page": 25,
    "identities": [
        {
            "id": "<id>",
            "api_key": "<api_key>",
            "label": "<label>",
            "status": "<active|disabled>",
            "master": <boolean>,
            "created_at": <timestamp>,
            "updated_at": <timestamp>,
            "expires_at": <timestamp>
        },
        {
            "id": "<id>",
            "api_key": "<api_key>",
            "label": "<label>",
            "status": "<active|disabled>",
            "master": <boolean>,
            "created_at": <timestamp>,
            "updated_at": <timestamp>,
            "expires_at": <timestamp>
        }
    ]
}

If no results are found, count will be 0 and the identities array will be empty.

Output Fields

Property Type Description
id string An account identity. A 32-character alphanumeric hash.
api_key string The API key for this identity.
label string The label applied to the identity when it was first created (by POST /account/identity) or the latest update (by PUT /account/identity).
status string Can be: active, disabled.
master boolean Indicates whether this is your master id or a client id.
created_at int Unix timestamp.
updated_at int Unix timestamp.
expires_at int Unix timestamp. Can be null.
count int The total number of identities.
page int The page number for the current page.
pages int The total number of pages.
per_page int The number of identities to display per page.
identities array(string) An array containing details of each individual identity.

Responses

Response code Description
Status 200 OK <div> The call was successful.
Status 400 Bad Request Occurs if any of the parameters are malformed.
  1. Retrieve details of an account identity labeled "test":

curl -X GET https://api.datasift.com/v1.3/account/identity?label=test 
    -H 'Authorization: username:api_key'

The output looks like this:

HTTP/1.1 200 OK
{
    "count": <total number of results>,
    "identities": [
        {
            "id": "<id>",
            "api_key": "<api_key>",
            "label": "<label>",
            "status": "<active|disabled>",
            "master": <boolean>,
            "created_at": <timestamp>,
            "updated_at": <timestamp>,
            "expires_at": <timestamp>
        }
    ]
}

  1. Retrieve details of an account identity by its id:

curl -X GET https://api.datasift.com/v1.3/account/identity/1234567890 
    -H 'Authorization: username:api_key'

The output looks like this:

HTTP/1.1 200 OK
{
    "count": 1,
    "identities": [
        {
            "id": "1234567890",
            "api_key": "<api_key>",
            "label": "<label>",
            "status": "<active|disabled>",
            "master": <boolean>,
            "created_at": <timestamp>,
            "updated_at": <timestamp>,
            "expires_at": <timestamp>
        }
    ]
}

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.

Resource information

Rate limit cost: 5

Requires authentication: Yes

Response formats: JSON, JSONP