API Keys

Endpoints related to managing a hub's API keys.

List API Keys

Requires the api-keys-manage capability.

SecuritybearerAuth and hubAuth
Request
query Parameters
sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

filter
object
object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a collection of API Key resources.

default

General error response from the platform

get/v1/hubs/current/api-keys
Response samples
application/json
{
  • "data": [
    ]
}

Create API Key

Requires the api-keys-manage capability.

SecuritybearerAuth and hubAuth
Request
Request Body schema: application/json

Parameters for creating an API Key.

name
string

A name given to the API Key.

object (Permissions)

Permissions information for an API Key

object

An object defining the capabilities of the given API key.

ips
Array of strings or null

An array of approved IPs from which this API Key can be used.

Responses
201

Returns an API Key.

default

General error response from the platform

post/v1/hubs/current/api-keys
Request samples
application/json
{
  • "name": "string",
  • "permissions": {
    },
  • "capabilities": {
    },
  • "ips": [
    ]
}
Response samples
application/json
{
  • "data": {
    }
}

Get API Key

Requries the api-keys-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
apikeyId
required
string

The ID of the API Key.

Responses
200

Returns an API Key resource.

default

General error response from the platform

get/v1/hubs/current/api-keys/{apikeyId}
Response samples
application/json
{
  • "data": {
    }
}

Update API Key

Requires the api-keys-manage capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
apikeyId
required
string

The ID of the API Key.

Request Body schema: application/json

Parameters for updating an API Key.

name
string

A name given to the API Key.

object (Permissions)

Permissions information for an API Key

object
ips
Array of strings or null

An array of approved IPs from which this API Key can be used.

Responses
200

Returns an API Key.

default

General error response from the platform

patch/v1/hubs/current/api-keys/{apikeyId}
Request samples
application/json
{
  • "name": "string",
  • "permissions": {
    },
  • "capabilities": {
    },
  • "ips": [
    ]
}
Response samples
application/json
{
  • "data": {
    }
}

Delete API Key

Requires the 'api-keys-manage' capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
apikeyId
required
string

The ID of the API Key.

Responses
200

Returns an API Key.

default

General error response from the platform

delete/v1/hubs/current/api-keys/{apikeyId}
Response samples
application/json
{
  • "data": {
    }
}