API Key Management
The API-Key Management APIs provide interface to manage API Keys. This is helpful if you need to maintain different sets of API Keys for different users/accounts on your platform.
Create new API Key
POST
https://api.clik.ai/smart-extract-api/api/account/v1/api-keys
This API lets you create a new API Key.
Headers
Authorization
String
Basic <base 64 encoded credentials>
Request Body
name*
string
Name of the API Key
enabled*
boolean
Create the API Key in enabled/disabled state
roles*
string[]
List of roles to attach to the API Key.
DATA_EXTRACTION - Allows the API Key access to data extraction APIs
ADMIN_ROLE - Allows the API Key access to admin APIs e.g. API Keys Management API
List API Keys
GET
https://api.clik.ai/smart-extract-api/api/account/v1/api-keys
This API returns a list of API Keys in the system
Query Parameters
page
number
API Keys list response page. Defaults to 1
pageSize
number
Number of records to return for a page. Defaults to 100
Update an API Key
PATCH
https://api.clik.ai/smart-extract-api/api/account/v1/api-keys/{apiKeyId}
This API updates an API Key's name, enabled status and roles
Path Parameters
apiKeyId*
string
The id of the API Key
Request Body
name
string
The name of the API Key
enabled
string
The enabled status of the API Key
roles
string[]
Roles to assign to the API Key. Valid roles are ADMIN_ROLE
and DATA_EXTRACTION
{
"apiKey": {
"id": "0300d235-87cb-4563-acb3-1825dbe34069",
"enabled": true,
"name": "Test API Key",
"key": "7d0878b65ff21abb875a64586ea9366e",
"createdAt": "2021-11-16T09:32:07.456Z",
"updatedAt": "2021-11-25T06:34:31.000Z",
"roles": [
"DATA_EXTRACTION",
"ADMIN_ROLE"
]
}
}
Delete an API Key
DELETE
https://api.clik.ai/smart-extract-api/api/account/v1/api-keys/{apiKeyId}
Deletes an API Key from the account
Path Parameters
apiKeyId
string
The id of the API Key to be deleted
{
// Response
}
Gets API Key details
GET
https://api.clik.ai/smart-extract-api/api/account/v1/api-keys/{apiKeyId}
Returns details for an API Key
Path Parameters
apiKeyId
string
The API Key id
{
"apiKey": {
"id": "13d2e1b5-45ff-436d-ac98-3a94670b3cf2",
"enabled": true,
"name": "Test API Key",
"key": "fc9fb2c051f2be65c6faef47f3758148",
"createdAt": "2021-11-16T08:52:30.260Z",
"updatedAt": "2021-11-16T08:52:30.260Z",
"roles": [
"DATA_EXTRACTION",
"ADMIN_ROLE"
]
}
}
Last updated