Projects
SDK reference for projects — Manage projects and project settings.
Manage projects and project settings.
listProjects
List all projects accessible to the authenticated user
GET
Usage:
const result = await swirls.client.projects.listProjects()listProjectSummaries
List projects with active-deployment resource counts and latest workflow execution
GET
Usage:
const result = await swirls.client.projects.listProjectSummaries()createProject
Create a new project, optionally from one activated system description
POST
Usage:
const result = await swirls.client.projects.createProject({
name: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
sourceActivationId | string | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | null | |
traceContentPolicy | "full" | "redacted" | "off" | |
lifecycleState | "active" | "disabling" | "disabled" | |
lifecycleChangedAt | unknown | |
disabledAt | unknown | null | |
createdAt | unknown | |
orgId | string | |
userId | string |
getProject
Get details of a specific project
GET
Usage:
const result = await swirls.client.projects.getProject({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
setActiveDeployment
Set or clear the project active deployment pin. Null clears the pin so the latest deployment by creation time is treated as active.
POST
Usage:
const result = await swirls.client.projects.setActiveDeployment({
projectId: '...',
deploymentId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
deploymentId | string | null | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | null | |
traceContentPolicy | "full" | "redacted" | "off" | |
lifecycleState | "active" | "disabling" | "disabled" | |
lifecycleChangedAt | unknown | |
disabledAt | unknown | null | |
createdAt | unknown | |
orgId | string | |
userId | string |
updateProject
Update project name or trace content policy
POST
Usage:
const result = await swirls.client.projects.updateProject({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
name | string | No | |
traceContentPolicy | "full" | "redacted" | "off" | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | null | |
traceContentPolicy | "full" | "redacted" | "off" | |
lifecycleState | "active" | "disabling" | "disabled" | |
lifecycleChangedAt | unknown | |
disabledAt | unknown | null | |
createdAt | unknown | |
orgId | string | |
userId | string |
deleteProject
Delete a project and its dependent data
POST
Usage:
const result = await swirls.client.projects.deleteProject({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
disableProject
Close project execution admission and begin quiescing live work
POST
Usage:
const result = await swirls.client.projects.disableProject({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | null | |
traceContentPolicy | "full" | "redacted" | "off" | |
lifecycleState | "active" | "disabling" | "disabled" | |
lifecycleChangedAt | unknown | |
disabledAt | unknown | null | |
createdAt | unknown | |
orgId | string | |
userId | string |
enableProject
Enable a fully quiesced project
POST
Usage:
const result = await swirls.client.projects.enableProject({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | null | |
traceContentPolicy | "full" | "redacted" | "off" | |
lifecycleState | "active" | "disabling" | "disabled" | |
lifecycleChangedAt | unknown | |
disabledAt | unknown | null | |
createdAt | unknown | |
orgId | string | |
userId | string |
listExecutions
List workflow executions for a project. Filter by workflowId (stable workflow) or workflowSnapshotId for one deploy snapshot.
GET
Usage:
const result = await swirls.client.projects.listExecutions({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
appName | string | No | |
status | string | No | |
workflowId | string | No | |
workflowSnapshotId | string | No | |
deploymentId | string | No | |
triggerType | string | No | |
executionScope | "all" | "root" | "subworkflow" | No | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |
listActivityExecutions
List execution summaries newest first, without counting history. Follow nextCursor to load older runs.
GET
Usage:
const result = await swirls.client.projects.listActivityExecutions({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
appName | string | No | |
status | string | No | |
workflowId | string | No | |
workflowSnapshotId | string | No | |
deploymentId | string | No | |
triggerType | string | No | |
executionScope | "all" | "root" | "subworkflow" | No | |
after | object | No | |
limit | number | No |
Output:
| Field | Type | Description |
|---|---|---|
results | object[] | |
nextCursor | object | null |
getKeySetInfo
Get Anvil KMS keyset info for a project
GET
Usage:
const result = await swirls.client.projects.getKeySetInfo({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
provisioned | boolean | |
keySetId | string | null | |
grants | object[] |
provisionKeySet
Provision an Anvil KMS keyset for a project
POST
Usage:
const result = await swirls.client.projects.provisionKeySet({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
keySetId | string |
revokeGrant
Revoke the platform client grant on a project keyset. Secrets will be inaccessible until access is restored.
POST
Usage:
const result = await swirls.client.projects.revokeGrant({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
revoked | true |
restoreGrant
Restore the platform client grant on a project keyset.
POST
Usage:
const result = await swirls.client.projects.restoreGrant({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
granted | true |
mintActorProjectGrant
Mint a short-lived WebSocket grant for the project directory Durable Object
POST
Usage:
const result = await swirls.client.projects.mintActorProjectGrant({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
actor | "directory" | "project" | "session" | "execution" | |
grant | string | |
websocketUrl | string | |
expiresAt | string | |
appId | string | |
projectId | string | |
sessionId | string | |
threadId | string | |
runId | string | |
executionId | string |