API keys
You can use API keys to access the Oblique API.
API keys have two kinds of permissions:
- Read-only: Can access all information via the Oblique API, but not perform any actions.
- Read-write: Can access all information and perform all actions via the Oblique API.
Create an API key
Section titled “Create an API key”
You must be a admin
to create an API key.
Navigate to the API keys page.
- Select Add API key.
- Enter a name for the API key. This name helps you understand why you generated an API key and identify the key.
- Select the permissions for the API key: read-only or read-write.
- Select Create key.
- An API key will be generated and displayed. Copy the API key and save it in a secure place, then select Done.
The API key can be used as bearer token to authenticate as the associated service account:
OBLIQUE_API_KEY="my-api-key"OBLIQUE_BASE_URL="https://us.oblique.security" # Or "https://eu.oblique.security"curl -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ "$OBLIQUE_BASE_URL/api/v1/users"Revoke an API key
Section titled “Revoke an API key”
You must be a admin
to revoke an API key.
Navigate to the API keys page.
- Locate the key to be removed. If you have a lot of keys, use the search bar to more easily find the desired key.
- For the selected key, in the More menu, select Delete….
- Confirm you want to revoke the key, and select Delete.
View API key logs
Section titled “View API key logs”
You must be a admin
to view API logs.
Audit logs are available for all write operations performed by an API key. To view logs for a given key, navigate to the API keys page.
- Locate the key to audit. If you have a lot of keys, use the search bar to more easily find the desired key.
- For the selected key, in the More menu, select View API key activity.