API Keys

Ion features the ability to create API client credential sets which can be used by developers to create automated systems that interact with Ion's core features.

Client credentials are used to add programmatic access to Ion. This can be used for scripting, automation and IoT devices. Users create these keys in their Organization and manage, update and delete them via the API/UI.

These are operations can be done with the following queries and mutations. List API Keys

query APIKeys {
apiKeys {
edges {
node {
clientId clientSecret
}
}
}
}

Create API Key

mutation CreateAPIKey {
createApiKey {
apikey {
clientId clientSecret
}
}
}

Update API Key (for enabling/disabling and regenerating Client Secrets)

mutation UpdateAPIKey($input: APIKeyInput!) {
updateApiKey(input: $input) {
apikey {
clientId clientSecret enabled
}
}
}
{
"input": {
"clientId": <your-client-id>,
"enabled": true | false,
"regenerateSecret": true | false
}
}

Delete API Key

mutation DeleteAPIKey($input: APIKeyInput!) {
deleteApiKey(input: $input) {
apikey {
clientId
}
}
}
{
"input": {
"clientId": <your-client-id>,
}
}