Commands
Retrieve commands. Use for dashboard analytics and command history.
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 or ID. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must identify the key's workspace.
^(?:ws_[0-9a-zA-Z]{24}|(?!ws[-_])[a-z0-9](-?[a-z0-9])*)$4 <= length <= 100Filter by project ID or name.
length <= 100Filter by deployment ID
dep_[0-9a-z]{28}$Filter by command state
Value in
- "PENDING_UPLOAD"
- "PENDING"
- "DISPATCHED"
- "SUCCEEDED"
- "FAILED"
- "EXPIRED"
Filter by command name
length <= 255Search commands by name
length <= 256Filter commands created after this date (ISO 8601)
date-timeFilter commands created before this date (ISO 8601)
date-timeOptional fields to include: deployment, project
Maximum number of items to return per page
1 <= value <= 10020Cursor for pagination - omit for first page
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v1/commands?project=my-project"{ "items": [ { "id": "cmd_2sxjXxvOYct7IohT3ukliAzf", "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc", "projectId": "prj_mcytp6z3j91f7tn5ryqsfwtr", "workspaceId": "ws_It13CUaGEhLLAB87simX0", "name": "string", "state": "PENDING_UPLOAD", "deploymentModel": "push", "target": { "resourceId": "string", "resourceType": "worker" }, "attempt": 0, "deadline": "2019-08-24T14:15:22Z", "requestSizeBytes": 0, "responseSizeBytes": 0, "createdAt": "2019-08-24T14:15:22Z", "dispatchedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "error": { "property1": null, "property2": null }, "accessRequestId": "string", "verification": { "state": "not-required", "reason": "string" }, "result": null, "resultAvailability": "available", "deployment": { "id": "dep_0c29fq4a2yjb7kx3smwdgxlc", "name": "string", "deploymentGroup": { "id": "string", "name": "string" }, "platform": "aws", "environmentInfo": { "accountId": "string", "region": "string", "platform": "aws" }, "managerId": "string", "managerUrl": "http://example.com", "managerName": "string", "managerIsSystem": true }, "project": { "id": "prj_mcytp6z3j91f7tn5ryqsfwtr", "name": "string" } } ], "nextCursor": "string"}Resolve which resource a command for this deployment would be addressed to, and how it would be delivered. Fails when the deployment has no command-capable resources, or more than one and no explicit target was named.
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 or ID. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must identify the key's workspace.
^(?:ws_[0-9a-zA-Z]{24}|(?!ws[-_])[a-z0-9](-?[a-z0-9])*)$4 <= length <= 100Deployment to resolve the target for
dep_[0-9a-z]{28}$Explicit resource id to resolve; must be a command-capable resource
length <= 255Command name being invoked. A name that is an operation enabled for the deployment fails with COMMAND_IS_OPERATION, which gives the alien operations invoke command to run instead.
1 <= length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/commands/target?deploymentId=dep_0c29fq4a2yjb7kx3smwdgxlc"{ "target": { "resourceId": "string", "resourceType": "worker" }, "deliveryMode": "push"}Retrieve a command by ID.
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 command.
cmd_[0-9a-zA-Z]{28}$Query Parameters
Workspace name or ID. Required for user/session/OAuth requests. Optional for API keys because API keys are workspace-scoped; if provided with an API key, it must identify the key's workspace.
^(?:ws_[0-9a-zA-Z]{24}|(?!ws[-_])[a-z0-9](-?[a-z0-9])*)$4 <= length <= 100Explicitly confirm access to an operation result marked sensitive.
Value in
- "true"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/commands/cmd_2sxjXxvOYct7IohT3ukliAzf"{ "id": "cmd_2sxjXxvOYct7IohT3ukliAzf", "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc", "projectId": "prj_mcytp6z3j91f7tn5ryqsfwtr", "workspaceId": "ws_It13CUaGEhLLAB87simX0", "name": "string", "state": "PENDING_UPLOAD", "deploymentModel": "push", "target": { "resourceId": "string", "resourceType": "worker" }, "attempt": 0, "deadline": "2019-08-24T14:15:22Z", "requestSizeBytes": 0, "responseSizeBytes": 0, "createdAt": "2019-08-24T14:15:22Z", "dispatchedAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "error": { "property1": null, "property2": null }, "accessRequestId": "string", "verification": { "state": "not-required", "reason": "string" }, "result": null, "resultAvailability": "available"}