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.
For Production environment:
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
{
"apiKey": {
"enabled": true,
"key": "52ee4d982ee6b2e0432f10c4d03a1b8a",
"name": "xyz",
"roles": [
"DATA_EXTRACTION"
],
"id": "84af7719-202f-430f-8d33-fdf0a7220b14",
"createdAt": "2021-11-25T06:20:16.829Z",
"updatedAt": "2021-11-25T06:20:16.829Z",
"secret": "9156a891d9d21fa98e9c54cf62815d46"
}
}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
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
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
For Staging environment:
Create new API Key
POST https://api.clik.ai/smart-extract-stg-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-stg-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-stg-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
Delete an API Key
DELETE https://api.clik.ai/smart-extract-stg-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
Gets API Key details
GET https://api.clik.ai/smart-extract-stg-api/api/account/v1/api-keys/{apiKeyId}
Returns details for an API Key
Path Parameters
apiKeyId
string
The API Key id
Last updated