Get API key details
GET /api/v1/api-keys/{keyId} Select code sample Fetch cURL
createdAt string
createdBy
status
Create API key Next
Revoke API key
const url = 'https://localhost:8080/api/v1/api-keys/example';const options = {method: 'GET', headers: {Authorization: '
'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}
curl --request GET \ --url https://localhost:8080/api/v1/api-keys/example \ --header 'Authorization:
'
Get details of one of the authenticated user’s API keys
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” keyId required stringAPI Key ID
Responses
Section titled “ Responses ”200
Section titled “200 ”API key details
Media type application/json object allowedIps ArrayKey lifecycle
string description string expiresAt string id string keyId string lastUsedAt string name string organizationId integer projectId integer revocationReason string revokedAt string revokedBy string scopesPermissions and scope
ArrayStatus
string usageCount integer userIdUser context
stringExample generated
{ "allowedIps": [ "example" ], "createdAt": "example", "createdBy": "example", "description": "example", "expiresAt": "example", "id": "example", "keyId": "example", "lastUsedAt": "example", "name": "example", "organizationId": 1, "projectId": 1, "revocationReason": "example", "revokedAt": "example", "revokedBy": "example", "scopes": [ "example" ], "status": "example", "usageCount": 1, "userId": "example"}
400
Section titled “400 ”Bad request - Key ID required
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
401
Section titled “401 ”Unauthorized - Authentication required
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
403
Section titled “403 ”Forbidden - Can only view own API keys
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
404
Section titled “404 ”API key not found
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
500
Section titled “500 ”Internal server error
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
Previous Create API key Next
Revoke API key