Costfluent Public API

List folders

GET
https://api.costfluent.com
/v1/folders
Bearer (API token)

Returns a workspace's top-level folders, each with its subfolders.

Needs a token with viewCostReports on the workspace.

List folders › query Parameters

workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
page
​integer · int32

The page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.

Default: 1
limit
​integer · int32

Items per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.

Default: 20

List folders › Responses

Success

​PaginationLinks · required
​FolderResponse[] · required

Create folder

POST
https://api.costfluent.com
/v1/folders
Bearer (API token)

Creates a new folder for organizing reports.

Needs a token with createFolder on the workspace.

Create folder › Headers

Idempotency-Key
​string · minLength: 1 · maxLength: 255

A unique value, at most 255 printable ASCII characters, such as a UUID, that makes retrying this create safe. A retry with the same key and the same request within 24 hours answers the first response again, marked Idempotent-Replayed: true, and creates nothing; the same key with another request answers 422 idempotency_key_reused. A key is kept only for a create that succeeded. Without it, every request creates.

Create folder › Request Body

workspaceId
​WorkspacePublicId · minLength: 1 · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
title
​string · minLength: 0 · maxLength: 200 · required
​

Create folder › Responses

Created

id
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required
title
​string · required

Get folder

GET
https://api.costfluent.com
/v1/folders/{folderId}
Bearer (API token)

Returns a specific folder.

Needs a token with viewCostReports on the workspace.

Get folder › path Parameters

folderId
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required

Get folder › query Parameters

workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required

Get folder › Responses

Success

id
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required
title
​string · required
reportCount
​integer · int32 · required
​
children
​array | null · FolderResponse (circular)
​

Update folder

PUT
https://api.costfluent.com
/v1/folders/{folderId}
Bearer (API token)

Updates a folder's title or parent in place; a field left out keeps its value, and clearParent moves the folder to the top of the tree.

Needs a token with updateFolder on the workspace.

Update folder › path Parameters

folderId
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required

Update folder › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Update folder › Request Body

workspaceId
​WorkspacePublicId · minLength: 1 · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
title
​string | null · minLength: 0 · maxLength: 200
​
clearParent
​boolean

Update folder › Responses

Success

id
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required
title
​string · required
reportCount
​integer · int32 · required
​
children
​array | null · FolderResponse (circular)
​

Delete folder

DELETE
https://api.costfluent.com
/v1/folders/{folderId}
Bearer (API token)

Deletes a folder. Its reports and subfolders move to its parent folder, or to the top level when it has none.

Needs a token with deleteFolder on the workspace.

Delete folder › path Parameters

folderId
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required

Delete folder › query Parameters

workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required

Delete folder › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Delete folder › Responses

No Content

No data returned

Set folder saved filter

PUT
https://api.costfluent.com
/v1/folders/{folderId}/saved-filter
Bearer (API token)

Attaches a saved filter of the same workspace to the folder, so every cost report in it and in its subfolders is read through that filter on top of its own. A null savedFilterId detaches the one attached.

Needs a token with updateFolder on the workspace.

Set folder saved filter › path Parameters

folderId
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required

Set folder saved filter › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Set folder saved filter › Request Body

workspaceId
​WorkspacePublicId · minLength: 1 · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
​

Set folder saved filter › Responses

Success

id
​FolderPublicId · pattern: ^fld_[A-Za-z0-9_-]{2… · required
title
​string · required
reportCount
​integer · int32 · required
​
children
​array | null · FolderResponse (circular)
​