Get API key by ID
const url = 'http://localhost:3000/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-API-Key: <X-API-Key>'Retrieves a specific API key by its unique identifier.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization UUID
API Key UUID
Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Responses
Section titled “Responses”API key retrieved successfully
object
Unique API key identifier
Display name for the API key
Description of the API key purpose
Prefix of the API key for identification (first 8 characters)
List of permission keys granted to this API key
When the API key was last used
When the API key expires
When the API key was created
User ID who created this API key
Example
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Production CI/CD Key", "description": "Used by GitHub Actions for automated deployments", "keyPrefix": "mwfm_abc", "permissions": [ "devices:read", "deployments:read", "deployments:write" ], "lastUsedAt": "2024-06-20T14:45:00Z", "expiresAt": "2025-12-31T23:59:59Z", "createdAt": "2024-01-15T10:30:00Z", "createdBy": "550e8400-e29b-41d4-a716-446655440001"}Unauthorized
Forbidden - Insufficient permissions
API key not found