Mint an API key (superuser only)
import requests
url = "https://eu.app.clarifeye.ai/api/v1/organization-api-keys/"
payload = {
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({organization: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'})
};
fetch('https://eu.app.clarifeye.ai/api/v1/organization-api-keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/organization-api-keys/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"api_key": "<string>"
}Organization API Keys
Mint an API key (superuser only)
The full api_key is returned ONCE in this response.
POST
/
organization-api-keys
/
Mint an API key (superuser only)
import requests
url = "https://eu.app.clarifeye.ai/api/v1/organization-api-keys/"
payload = {
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({organization: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'})
};
fetch('https://eu.app.clarifeye.ai/api/v1/organization-api-keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/organization-api-keys/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"api_key": "<string>"
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer