Analytics REST API Key Management

The API Keys

Analytics uses two types of API keys:

The System API Key

Scoped API Keys

GET /analytics/api/v1/apikeys

RETURNS: A list of defined scoped API keys (i.e. this does NOT list the system API keys at all).

Headers:

Authorization: <SYSTEM API KEY>

Example:

[

{

"scope": "EVENTS",

"key": "UUID",

"client": 100,

"description": "some text"

}

]

The response is described using this JSON schema:

{

"type": array,

"items": {

"type": "object",

"properties": {

"scope": {

"type": "string",

"enum": ["TELEMETRY", "EVENTS"]

},

"key": {

"type": "string"

},

"client": {

"type": "integer",

"description": "This is required for EVENTS keys, ignored for TELEMETRY keys"

},

"description": {

"type": "string"

}

},

"required": ["scope", "key"]

}

}

POST

Creates a new API key.

POST /analytics/api/v1/apikeys

{

"scope": "EVENTS",

"client": 100,

"description": "some text"

}

Headers:

Authorization: <SYSTEM API KEY>

The POST body JSON schema:

{

"type": "object",

"properties": {

"scope": {

"type": "string",

"enum": ["TELEMETRY", "EVENTS"]

},

"client": {

"type": "integer",

"description": "This is required for EVENTS keys, ignored for TELEMETRY keys"

},

"description": {

"type": "string"

}

},

"required": ["scope"]

}

Response JSON schema:

{

"type": "object",

"properties": {

"scope": {

"type": "string",

"enum": ["TELEMETRY", "EVENTS"]

},

"key": {

"type": "string"

},

"client": {

"type": "integer",

"description": "This is required for EVENTS keys, ignored for TELEMETRY keys"

},

"description": {

"type": "string"

}

},

"required": ["scope", "key"]

}

Response example:

{

"key": "UUID",

"scope": "EVENTS",

"client": 100,

"description": "some text"

}

DELETE

Deletes an API key.

DELETE: /analytics/api/v1/apikeys/<UUID>

Headers:

Authorization: <SYSTEM API KEY>

See also: