Docs

Debug Sessions

GET
/v1/debug-sessions

Retrieve debug sessions for dashboard audit. Filters: project, deployment, state, mode.

AuthorizationBearer <token>

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?string

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.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100
project?string

Filter by project ID or name.

Lengthlength <= 100
deploymentId?string

Filter by deployment ID

Matchdep_[0-9a-z]{28}$
state?string

Filter by session state

Value in

  • "pending"
  • "running"
  • "stopping"
  • "stopped"
  • "expired"
  • "failed"
mode?string

Filter by deployment model (push/pull). Joins against the parent deployment.

Value in

  • "push"
  • "pull"
provider?string

Filter by cloud provider. Joins against the parent deployment.

Value in

  • "aws"
  • "gcp"
  • "azure"
  • "kubernetes"
  • "machines"
  • "local"
  • "test"
limit?integer

Maximum number of items to return per page

Range1 <= value <= 100
Default20
cursor?string

Cursor for pagination - omit for first page

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/debug-sessions?project=my-project"
{  "items": [    {      "id": "dbg_HOXmkmT9UPYlsnxqSNlEGoXL",      "owner": "string",      "state": "pending",      "mode": "push",      "provider": "aws",      "presignedUrls": {        "property1": {          "readUrl": "http://example.com",          "writeUrl": "http://example.com"        },        "property2": {          "readUrl": "http://example.com",          "writeUrl": "http://example.com"        }      },      "error": null,      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc",      "projectId": "prj_mcytp6z3j91f7tn5ryqsfwtr",      "workspaceId": "ws_It13CUaGEhLLAB87simX0"    }  ],  "nextCursor": "string"}
POST
/v1/debug-sessions

Create a debug-session audit row. Called by the manager when a pull or push debug tunnel is opened. Workspace + project derived from deployment.

AuthorizationBearer <token>

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?string

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.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Request 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/debug-sessions" \  -H "Content-Type: application/json" \  -d '{    "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc",    "expiresAt": "2019-08-24T14:15:22Z"  }'
{  "id": "dbg_HOXmkmT9UPYlsnxqSNlEGoXL",  "owner": "string",  "state": "pending",  "mode": "push",  "provider": "aws",  "presignedUrls": {    "property1": {      "readUrl": "http://example.com",      "writeUrl": "http://example.com"    },    "property2": {      "readUrl": "http://example.com",      "writeUrl": "http://example.com"    }  },  "error": null,  "createdAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc",  "projectId": "prj_mcytp6z3j91f7tn5ryqsfwtr",  "workspaceId": "ws_It13CUaGEhLLAB87simX0"}
GET
/v1/debug-sessions/{id}

Retrieve a debug session by ID.

AuthorizationBearer <token>

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

id*string

Unique identifier for the debug session.

Matchdbg_[0-9a-zA-Z]{28}$

Query Parameters

workspace?string

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.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/debug-sessions/dbg_HOXmkmT9UPYlsnxqSNlEGoXL"
{  "id": "dbg_HOXmkmT9UPYlsnxqSNlEGoXL",  "owner": "string",  "state": "pending",  "mode": "push",  "provider": "aws",  "presignedUrls": {    "property1": {      "readUrl": "http://example.com",      "writeUrl": "http://example.com"    },    "property2": {      "readUrl": "http://example.com",      "writeUrl": "http://example.com"    }  },  "error": null,  "createdAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc",  "projectId": "prj_mcytp6z3j91f7tn5ryqsfwtr",  "workspaceId": "ws_It13CUaGEhLLAB87simX0"}
PATCH
/v1/debug-sessions/{id}

Update debug-session state. Called by manager on tunnel attach, close, or deadline expiry.

AuthorizationBearer <token>

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

id*string

Unique identifier for the debug session.

Matchdbg_[0-9a-zA-Z]{28}$

Query Parameters

workspace?string

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.

Match^(?!ws[-_])[a-z0-9](-?[a-z0-9])*$
Length4 <= length <= 100

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/debug-sessions/dbg_HOXmkmT9UPYlsnxqSNlEGoXL" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "dbg_HOXmkmT9UPYlsnxqSNlEGoXL",  "owner": "string",  "state": "pending",  "mode": "push",  "provider": "aws",  "presignedUrls": {    "property1": {      "readUrl": "http://example.com",      "writeUrl": "http://example.com"    },    "property2": {      "readUrl": "http://example.com",      "writeUrl": "http://example.com"    }  },  "error": null,  "createdAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "deploymentId": "dep_0c29fq4a2yjb7kx3smwdgxlc",  "projectId": "prj_mcytp6z3j91f7tn5ryqsfwtr",  "workspaceId": "ws_It13CUaGEhLLAB87simX0"}