ReferenceSDKClient
Secrets
SDK reference for secrets — Manage encrypted secrets (key-value pairs) scoped to a project.
Manage encrypted secrets (key-value pairs) scoped to a project.
listSecrets
List all secrets in a project (values are masked)
GET
Usage:
const result = await swirls.client.secrets.listSecrets({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes |
getSecretValue
GET
Usage:
const result = await swirls.client.secrets.getSecretValue({
projectId: '...',
secretId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
secretId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
value | string |
createSecret
Create a new secret
POST
Usage:
const result = await swirls.client.secrets.createSecret({
projectId: '...',
key: '...',
value: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
key | string | Yes | |
value | string | Yes | |
sensitive | boolean | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string |
updateSecret
Update a secret
POST
Usage:
const result = await swirls.client.secrets.updateSecret({
projectId: '...',
secretId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
secretId | string | Yes | |
key | string | No | |
value | string | No | |
sensitive | boolean | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string |
deleteSecret
Delete a secret
POST
Usage:
const result = await swirls.client.secrets.deleteSecret({
projectId: '...',
secretId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
secretId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string |