Costfluent Public API

Get tag key

GET
https://api.costfluent.com
/v1/tag-keys/{tagKeyId}
Bearer (API token)

Returns a specific tag key.

Needs an organization token with viewOrganization.

Get tag key › path Parameters

tagKeyId
​TagKeyPublicId · pattern: ^tag_[A-Za-z0-9_-]{2… · required

Get tag key › Responses

Success

id
​TagKeyPublicId · pattern: ^tag_[A-Za-z0-9_-]{2… · required
key
​string · required
providerKeys
​string[] · required
createdAt
​string · date-time · required
isHidden
​boolean · required
isPreferred
​boolean · required
lastSeenAt
​string | null · date-time

Delete tag key

DELETE
https://api.costfluent.com
/v1/tag-keys/{tagKeyId}
Bearer (API token)

Deletes a tag key.

Needs an organization token with manageTagKeys.

Delete tag key › path Parameters

tagKeyId
​TagKeyPublicId · pattern: ^tag_[A-Za-z0-9_-]{2… · required

Delete tag key › Responses

No Content

No data returned

Get the workspace's tag policy

GET
https://api.costfluent.com
/v1/workspaces/{workspaceId}/tag-policy
Bearer (API token)

The tag keys every cost row must carry, per provider and account, in the order written, and the cost report that lists non-compliant cost by account. A workspace that never saved a policy answers no rules.

Needs a token with viewTags on the workspace.

Get the workspace's tag policy › path Parameters

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

Get the workspace's tag policy › Responses

Success

​TagPolicyRuleResponse[] · required
​
updatedAt
​string | null · date-time

Replace the workspace's tag policy

PUT
https://api.costfluent.com
/v1/workspaces/{workspaceId}/tag-policy
Bearer (API token)

Replaces the policy whole with the rules sent, in order, and returns it as stored. An empty rule list clears it, and every cost row then reads as compliant. Saving the first rules also creates the cost report that lists non-compliant cost by account, named by reportId. Costfluent measures the policy and changes nothing in the cloud.

Needs a token with manageTags on the workspace.

Replace the workspace's tag policy › path Parameters

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

Replace the workspace's tag policy › Request Body

Replace the workspace's tag policy › Responses

Success

​TagPolicyRuleResponse[] · required
​
updatedAt
​string | null · date-time

List tag keys

GET
https://api.costfluent.com
/v1/tag-keys
Bearer (API token)

Returns all discovered tag keys for the organization.

Needs an organization token with viewOrganization.

List tag keys › query Parameters

providerKey
​string | null
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 tag keys › Responses

Success

​PaginationLinks · required
​TagKeyResponse[] · required