api keys.md

API Keys

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.

A few details regarding these API Keys:

Operations

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

Create API Key

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

List API Keys

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

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>,
    "_etag": <your-api-keys-_etag>
  }
}

Service Accounts

Service accounts decouple API keys from users who may get deactivated and clearly indicates that a service account is committing actions in ION and not any given team member. A service account is an email that your company creates and maintains outside of an employee's email that multiple people may be able to access as needed.

Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the ask query parameter, and the optional goal query parameter:

GET https://manual.firstresonance.io/api/api-keys.md?ask=<question>&goal=<endgoal>

ask is the immediate question: it should be specific, self-contained, and written in natural language.
goal is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.