ReferenceSDKClient
Folders
SDK reference for folders — Organize resources into folders within a project.
Organize resources into folders within a project.
createFolder
Create a new folder for organizing resources
POST
Usage:
const result = await swirls.client.folders.createFolder({
projectId: '...',
name: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | No | |
projectId | string | Yes | |
name | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string |
getFolder
Get a folder by ID
GET
Usage:
const result = await swirls.client.folders.getFolder({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
name | string | |
createdAt | unknown | |
orgId | string | null | |
userId | string |
updateFolder
Update a folder
PUT
Usage:
const result = await swirls.client.folders.updateFolder({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | No |
Output:
| Field | Type | Description |
|---|---|---|
id | string | |
projectId | string | |
name | string | |
createdAt | unknown | |
orgId | string | null | |
userId | string |
deleteFolder
Delete a folder
DELETE
Usage:
const result = await swirls.client.folders.deleteFolder({
id: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes |
listFolders
List all folders in a project
GET
Usage:
const result = await swirls.client.folders.listFolders({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
pagination | object | No |
Output:
| Field | Type | Description |
|---|---|---|
pagination | object | |
results | object[] | |
totalCount | number |