Api Keys
Retrieve all API keys for the current workspace.
Authorization
apiKey API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Query Parameters
Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$4 <= length <= 100Filter by project ID or name.
length <= 100Maximum number of items to return per page
1 <= value <= 10020Cursor for pagination - omit for first page
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/api-keys?project=my-project"{ "items": [ { "id": "apikey_ye96yxs1tjnrrwulp8frh", "description": "string", "keyPrefix": "string", "type": "workspace", "role": "string", "workspaceId": "string", "projectId": "string", "deploymentId": "string", "deploymentGroupId": "string", "managerId": "string", "enabled": true, "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z", "deploymentSetupConfig": { "metadata": { "property1": null, "property2": null }, "policy": { "allowedPlatforms": [ "aws" ], "allowedKubernetesBasePlatforms": [ "aws" ], "allowedKubernetesClusterSources": [ "create" ], "allowedSetupMethods": [ "cloudformation" ], "allowReleasePinning": true, "stackSettings": { "defaults": { "compute": { "pools": { "property1": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" }, "property2": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" } } }, "deploymentModel": "push", "domains": { "customDomains": { "property1": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" }, "property2": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" } }, "publicEndpointTarget": { "mode": "machineAddresses" } }, "externalBindings": {}, "heartbeats": "off", "kubernetes": { "cluster": { "cloud": { "accountId": "string", "clusterId": "string", "clusterName": "string", "projectId": "string", "region": "string", "resourceGroup": "string", "subscriptionId": "string" }, "namespace": "string", "ownership": "managed" }, "exposure": { "mode": "disabled" } }, "network": { "type": "use-default" }, "telemetry": "off", "updates": "auto" }, "allowedDeploymentModels": [ "push" ], "allowedNetworkModes": [ "none" ], "allowedUpdatesModes": [ "auto" ], "allowedTelemetryModes": [ "auto" ], "allowedHeartbeatsModes": [ "on" ], "allowExternalBindings": true, "allowCustomRegistry": true } }, "environmentVariables": [ { "name": "string", "type": "plain", "targetResources": [ "string" ] } ], "items": [ { "item": "deployment", "source": { "type": "project-release", "releaseChannel": "string", "releaseId": "rel_WbhQgksrawSKIpEN0NAssHX9", "resourceId": "string" }, "required": true, "configuration": { "allowedProviders": [ "aws-bedrock" ], "providerAllowlist": [ "aws-bedrock" ], "modelRequirements": [ { "publicModelId": "string", "clientApis": [ "openai-chat" ], "required": true } ] } } ] }, "createdByUser": { "id": "string", "email": "string", "image": "string" } } ], "nextCursor": "string"}Create a new API key.
Authorization
apiKey API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Query Parameters
Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$4 <= length <= 100Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request schema for creating a new API key
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/api-keys" \ -H "Content-Type: application/json" \ -d '{ "description": "string", "scope": { "type": "workspace", "role": "workspace.member" }, "expiresAt": "2019-08-24T14:15:22Z" }'{ "apiKey": "string", "keyInfo": { "id": "apikey_ye96yxs1tjnrrwulp8frh", "description": "string", "keyPrefix": "string", "type": "workspace", "role": "string", "workspaceId": "string", "projectId": "string", "deploymentId": "string", "deploymentGroupId": "string", "managerId": "string", "enabled": true, "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z", "deploymentSetupConfig": { "metadata": { "property1": null, "property2": null }, "policy": { "allowedPlatforms": [ "aws" ], "allowedKubernetesBasePlatforms": [ "aws" ], "allowedKubernetesClusterSources": [ "create" ], "allowedSetupMethods": [ "cloudformation" ], "allowReleasePinning": true, "stackSettings": { "defaults": { "compute": { "pools": { "property1": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" }, "property2": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" } } }, "deploymentModel": "push", "domains": { "customDomains": { "property1": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" }, "property2": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" } }, "publicEndpointTarget": { "mode": "machineAddresses" } }, "externalBindings": {}, "heartbeats": "off", "kubernetes": { "cluster": { "cloud": { "accountId": "string", "clusterId": "string", "clusterName": "string", "projectId": "string", "region": "string", "resourceGroup": "string", "subscriptionId": "string" }, "namespace": "string", "ownership": "managed" }, "exposure": { "mode": "disabled" } }, "network": { "type": "use-default" }, "telemetry": "off", "updates": "auto" }, "allowedDeploymentModels": [ "push" ], "allowedNetworkModes": [ "none" ], "allowedUpdatesModes": [ "auto" ], "allowedTelemetryModes": [ "auto" ], "allowedHeartbeatsModes": [ "on" ], "allowExternalBindings": true, "allowCustomRegistry": true } }, "environmentVariables": [ { "name": "string", "type": "plain", "targetResources": [ "string" ] } ], "items": [ { "item": "deployment", "source": { "type": "project-release", "releaseChannel": "string", "releaseId": "rel_WbhQgksrawSKIpEN0NAssHX9", "resourceId": "string" }, "required": true, "configuration": { "allowedProviders": [ "aws-bedrock" ], "providerAllowlist": [ "aws-bedrock" ], "modelRequirements": [ { "publicModelId": "string", "clientApis": [ "openai-chat" ], "required": true } ] } } ] } }}Retrieve a specific API key.
Authorization
apiKey API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Path Parameters
Unique identifier for the api key.
apikey_[0-9a-z]{28}$Query Parameters
Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$4 <= length <= 100Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/api-keys/apikey_ye96yxs1tjnrrwulp8frh"{ "id": "apikey_ye96yxs1tjnrrwulp8frh", "description": "string", "keyPrefix": "string", "type": "workspace", "role": "string", "workspaceId": "string", "projectId": "string", "deploymentId": "string", "deploymentGroupId": "string", "managerId": "string", "enabled": true, "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z", "deploymentSetupConfig": { "metadata": { "property1": null, "property2": null }, "policy": { "allowedPlatforms": [ "aws" ], "allowedKubernetesBasePlatforms": [ "aws" ], "allowedKubernetesClusterSources": [ "create" ], "allowedSetupMethods": [ "cloudformation" ], "allowReleasePinning": true, "stackSettings": { "defaults": { "compute": { "pools": { "property1": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" }, "property2": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" } } }, "deploymentModel": "push", "domains": { "customDomains": { "property1": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" }, "property2": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" } }, "publicEndpointTarget": { "mode": "machineAddresses" } }, "externalBindings": {}, "heartbeats": "off", "kubernetes": { "cluster": { "cloud": { "accountId": "string", "clusterId": "string", "clusterName": "string", "projectId": "string", "region": "string", "resourceGroup": "string", "subscriptionId": "string" }, "namespace": "string", "ownership": "managed" }, "exposure": { "mode": "disabled" } }, "network": { "type": "use-default" }, "telemetry": "off", "updates": "auto" }, "allowedDeploymentModels": [ "push" ], "allowedNetworkModes": [ "none" ], "allowedUpdatesModes": [ "auto" ], "allowedTelemetryModes": [ "auto" ], "allowedHeartbeatsModes": [ "on" ], "allowExternalBindings": true, "allowCustomRegistry": true } }, "environmentVariables": [ { "name": "string", "type": "plain", "targetResources": [ "string" ] } ], "items": [ { "item": "deployment", "source": { "type": "project-release", "releaseChannel": "string", "releaseId": "rel_WbhQgksrawSKIpEN0NAssHX9", "resourceId": "string" }, "required": true, "configuration": { "allowedProviders": [ "aws-bedrock" ], "providerAllowlist": [ "aws-bedrock" ], "modelRequirements": [ { "publicModelId": "string", "clientApis": [ "openai-chat" ], "required": true } ] } } ] }, "createdByUser": { "id": "string", "email": "string", "image": "string" }}Update an API key (enable/disable, change description).
Authorization
apiKey API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Path Parameters
Unique identifier for the api key.
apikey_[0-9a-z]{28}$Query Parameters
Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$4 <= length <= 100Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request schema for updating an API key
Response Body
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/api-keys/apikey_ye96yxs1tjnrrwulp8frh" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "apikey_ye96yxs1tjnrrwulp8frh", "description": "string", "keyPrefix": "string", "type": "workspace", "role": "string", "workspaceId": "string", "projectId": "string", "deploymentId": "string", "deploymentGroupId": "string", "managerId": "string", "enabled": true, "createdAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "revokedAt": "2019-08-24T14:15:22Z", "deploymentSetupConfig": { "metadata": { "property1": null, "property2": null }, "policy": { "allowedPlatforms": [ "aws" ], "allowedKubernetesBasePlatforms": [ "aws" ], "allowedKubernetesClusterSources": [ "create" ], "allowedSetupMethods": [ "cloudformation" ], "allowReleasePinning": true, "stackSettings": { "defaults": { "compute": { "pools": { "property1": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" }, "property2": { "failure_domains": { "selectedFailureDomains": [ "string" ], "spread": 0 }, "machine": "string", "machines": 0, "mode": "fixed" } } }, "deploymentModel": "push", "domains": { "customDomains": { "property1": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" }, "property2": { "certificate": { "aws": { "certificateArn": "string" }, "azure": { "keyVaultCertificateId": "string", "keyVaultResourceId": "string" }, "gcp": { "certificateName": "string" }, "kubernetes": { "tlsSecretRef": { "namespace": "string", "secretName": "string" } } }, "domain": "string" } }, "publicEndpointTarget": { "mode": "machineAddresses" } }, "externalBindings": {}, "heartbeats": "off", "kubernetes": { "cluster": { "cloud": { "accountId": "string", "clusterId": "string", "clusterName": "string", "projectId": "string", "region": "string", "resourceGroup": "string", "subscriptionId": "string" }, "namespace": "string", "ownership": "managed" }, "exposure": { "mode": "disabled" } }, "network": { "type": "use-default" }, "telemetry": "off", "updates": "auto" }, "allowedDeploymentModels": [ "push" ], "allowedNetworkModes": [ "none" ], "allowedUpdatesModes": [ "auto" ], "allowedTelemetryModes": [ "auto" ], "allowedHeartbeatsModes": [ "on" ], "allowExternalBindings": true, "allowCustomRegistry": true } }, "environmentVariables": [ { "name": "string", "type": "plain", "targetResources": [ "string" ] } ], "items": [ { "item": "deployment", "source": { "type": "project-release", "releaseChannel": "string", "releaseId": "rel_WbhQgksrawSKIpEN0NAssHX9", "resourceId": "string" }, "required": true, "configuration": { "allowedProviders": [ "aws-bedrock" ], "providerAllowlist": [ "aws-bedrock" ], "modelRequirements": [ { "publicModelId": "string", "clientApis": [ "openai-chat" ], "required": true } ] } } ] }, "createdByUser": { "id": "string", "email": "string", "image": "string" }}Revoke (soft delete) an API key.
Authorization
apiKey API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Path Parameters
Unique identifier for the api key.
apikey_[0-9a-z]{28}$Query Parameters
Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$4 <= length <= 100Response Body
application/json
application/json
curl -X DELETE "https://example.com/v1/api-keys/apikey_ye96yxs1tjnrrwulp8frh"Permanently delete multiple API keys.
Authorization
apiKey API key for authentication, must be provided as a Bearer token. Generate an API key at https://alien.dev/api-keys
In: header
Query Parameters
Workspace name. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must match the key's workspace.
^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$4 <= length <= 100Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/api-keys/batch-delete" \ -H "Content-Type: application/json" \ -d '{ "ids": [ "apikey_ye96yxs1tjnrrwulp8frh" ] }'{ "deletedCount": 0}