SWIRLS_
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:

ParameterTypeRequiredDescription
idstringNo
projectIdstringYes
namestringYes

Output:

FieldTypeDescription
idstring

getFolder

Get a folder by ID

GET

Usage:

const result = await swirls.client.folders.getFolder({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

Output:

FieldTypeDescription
idstring
projectIdstring
namestring
createdAtunknown
orgIdstring | null
userIdstring

updateFolder

Update a folder

PUT

Usage:

const result = await swirls.client.folders.updateFolder({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes
namestringNo

Output:

FieldTypeDescription
idstring
projectIdstring
namestring
createdAtunknown
orgIdstring | null
userIdstring

deleteFolder

Delete a folder

DELETE

Usage:

const result = await swirls.client.folders.deleteFolder({
  id: '...',
})

Input:

ParameterTypeRequiredDescription
idstringYes

listFolders

List all folders in a project

GET

Usage:

const result = await swirls.client.folders.listFolders({
  projectId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
paginationobjectNo

Output:

FieldTypeDescription
paginationobject
resultsobject[]
totalCountnumber

On this page