SDKClient

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:

ParameterTypeRequiredDescription
namestringYes
sourceActivationIdstringNo

Output:

FieldTypeDescription
idstring
namestring
activeDeploymentIdstring | null
anvilKeySetIdstring | null
traceContentPolicy"full" | "redacted" | "off"
lifecycleState"active" | "disabling" | "disabled"
lifecycleChangedAtunknown
disabledAtunknown | null
createdAtunknown
orgIdstring
userIdstring

getProject

Get details of a specific project

GET

Usage:

const result = await swirls.client.projects.getProject({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

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:

ParameterTypeRequiredDescription
projectIdstringYes
deploymentIdstring | nullYes

Output:

FieldTypeDescription
idstring
namestring
activeDeploymentIdstring | null
anvilKeySetIdstring | null
traceContentPolicy"full" | "redacted" | "off"
lifecycleState"active" | "disabling" | "disabled"
lifecycleChangedAtunknown
disabledAtunknown | null
createdAtunknown
orgIdstring
userIdstring

updateProject

Update project name or trace content policy

POST

Usage:

const result = await swirls.client.projects.updateProject({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
namestringNo
traceContentPolicy"full" | "redacted" | "off"No

Output:

FieldTypeDescription
idstring
namestring
activeDeploymentIdstring | null
anvilKeySetIdstring | null
traceContentPolicy"full" | "redacted" | "off"
lifecycleState"active" | "disabling" | "disabled"
lifecycleChangedAtunknown
disabledAtunknown | null
createdAtunknown
orgIdstring
userIdstring

deleteProject

Delete a project and its dependent data

POST

Usage:

const result = await swirls.client.projects.deleteProject({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

disableProject

Close project execution admission and begin quiescing live work

POST

Usage:

const result = await swirls.client.projects.disableProject({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
idstring
namestring
activeDeploymentIdstring | null
anvilKeySetIdstring | null
traceContentPolicy"full" | "redacted" | "off"
lifecycleState"active" | "disabling" | "disabled"
lifecycleChangedAtunknown
disabledAtunknown | null
createdAtunknown
orgIdstring
userIdstring

enableProject

Enable a fully quiesced project

POST

Usage:

const result = await swirls.client.projects.enableProject({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
idstring
namestring
activeDeploymentIdstring | null
anvilKeySetIdstring | null
traceContentPolicy"full" | "redacted" | "off"
lifecycleState"active" | "disabling" | "disabled"
lifecycleChangedAtunknown
disabledAtunknown | null
createdAtunknown
orgIdstring
userIdstring

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:

ParameterTypeRequiredDescription
projectIdstringYes
appNamestringNo
statusstringNo
workflowIdstringNo
workflowSnapshotIdstringNo
deploymentIdstringNo
triggerTypestringNo
executionScope"all" | "root" | "subworkflow"No
paginationobjectNo

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

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:

ParameterTypeRequiredDescription
projectIdstringYes
appNamestringNo
statusstringNo
workflowIdstringNo
workflowSnapshotIdstringNo
deploymentIdstringNo
triggerTypestringNo
executionScope"all" | "root" | "subworkflow"No
afterobjectNo
limitnumberNo

Output:

FieldTypeDescription
resultsobject[]
nextCursorobject | null

getKeySetInfo

Get Anvil KMS keyset info for a project

GET

Usage:

const result = await swirls.client.projects.getKeySetInfo({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
provisionedboolean
keySetIdstring | null
grantsobject[]

provisionKeySet

Provision an Anvil KMS keyset for a project

POST

Usage:

const result = await swirls.client.projects.provisionKeySet({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
keySetIdstring

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:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
revokedtrue

restoreGrant

Restore the platform client grant on a project keyset.

POST

Usage:

const result = await swirls.client.projects.restoreGrant({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
grantedtrue

mintActorProjectGrant

Mint a short-lived WebSocket grant for the project directory Durable Object

POST

Usage:

const result = await swirls.client.projects.mintActorProjectGrant({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes

Output:

FieldTypeDescription
actor"directory" | "project" | "session" | "execution"
grantstring
websocketUrlstring
expiresAtstring
appIdstring
projectIdstring
sessionIdstring
threadIdstring
runIdstring
executionIdstring

On this page