API Keys
An alternate way to access Telmai APIs using API Key.
All Telmai APIs can be executed either with OAuth access token or API keys. Use APIs listed below to create a key. Use this key in the header of the Telmai APIs instead of the Authorization bearer token like this:
X-TLM-Key:{API Key}
Execute Authenticate API to retrieve access token for Authorization header used below
Tenant Id can be retrieved from the UI as listed here.
Retrieve all API Keys for specific tenant
Retrieves the list of API Keys for the given tenant.
GET
/auth/{tenant}/apiKeys
Query Parameters
Name
Type
Description
tenant*
string
Unique Tenant identifier
curl -X 'GET' \
'/auth/<tenant>/apiKeys'
-H 'accept: */*'
Responses
{
"keys": [
{
"id": "string",
"name": "string"
}
]
}
Create an API Key
Creates a new API key associated with the specified tenant.
POST
/auth/{tenant}/apiKeys
Path Parameters
tenant*
string
Unique identifier for the tenant.
Request Body
name*
String
Name of the API Key
curl -X 'POST' \
'/auth/<tenant>/apiKeys' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"name": "<name>"
}'
Responses
{
"id": "string",
"name": "string",
"key": "string"
}
Get details of specific API Key
Fetches the API key information using a unique key ID for a specific tenant.
GET
/auth/{tenant}/apiKeys/{keyId}
Path Parameters
tenant
string
Yes
Tenant identifier
keyId
string
Yes
Unique API Key ID
curl -X 'GET'
'/auth/<tenant>/apiKeys/<keyId>'
-H 'accept: */*'
Responses
{
"id": "string",
"name": "string",
}
Delete an API Key
Removes the API Key with the specified keyId
for the given tenant
.
Parameters:
tenant*
string
The identifier of the tenant.
keyId*
string
The unique identifier of the API Key to delete.
curl -X 'DELETE'
'/auth/<tenant>/apiKeys/<keyId>'
-H 'accept: */*'
Responses
{
"message": "string"
}
Last updated