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()createProject
Create a new project
POST
Usage:
const result = await swirls.client.projects.createProject({
name: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | 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 | |
createdAt | unknown | |
orgId | string | |
userId | string |
updateProject
Rename a project
POST
Usage:
const result = await swirls.client.projects.updateProject({
projectId: '...',
name: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
name | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
activeDeploymentId | string | null | |
anvilKeySetId | string | 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 |
listExecutions
List graph executions for a project. Filter by graphId (stable graph) or graphSnapshotId for one deploy snapshot.
GET
Usage:
const result = await swirls.client.projects.listExecutions({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
status | string | No | |
graphId | string | No | |
graphSnapshotId | string | No | |
deploymentId | string | No | |
triggerType | string | No | |
executionScope | "all" | "root" | "subgraph" | No | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |
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 |