Costfluent Docs
  • Documentation
  • API Reference
Information
Workspaces
    List workspacesgetCreate workspacepostGet workspacegetUpdate workspaceputDelete workspacedeleteGet the workspace's exchange rate policyget
Virtual Tags
    Activate virtual tagpostList virtual tagsgetCreate virtual tagpostDeactivate virtual tagpostGet virtual taggetDelete virtual tagdeleteUpdate virtual tagpatch
Virtual-Tags
    Activate virtual tagpostList virtual tagsgetCreate virtual tagpostDeactivate virtual tagpostGet virtual taggetDelete virtual tagdeleteUpdate virtual tagpatch
Utility
    Get current token infogetHealth checkget
Me
    Get current token infoget
Ping
    Health checkget
Tags
    Get tag keygetDelete tag keydeleteList tag keysget
Tag-Keys
    Get tag keygetDelete tag keydeleteList tag keysget
Saved Filters
    List saved filtersgetCreate saved filterpostGet saved filtergetUpdate saved filterputDelete saved filterdelete
Saved-Filters
    List saved filtersgetCreate saved filterpostGet saved filtergetUpdate saved filterputDelete saved filterdelete
Providers
    List providersgetConnect providerpostGet providergetDelete providerdeleteGet available providersgetGet provider sync historygetTest provider connectionpostTrigger provider syncpostUpdate providerput
Folders
    List foldersgetCreate folderpostGet foldergetUpdate folderputDelete folderdelete
Exchange Rates
    Get available currenciesgetGet exchange rategetGet the workspace's exchange rate policygetList exchange ratesget
Exchange-Rates
    Get available currenciesgetGet exchange rategetList exchange ratesget
Dashboards
    List dashboardsgetCreate dashboardpostGet dashboardgetUpdate dashboardputDelete dashboarddelete
Custom Provider
    Submit costs batchpost
Custom-Providers
    Submit costs batchpost
Report Notifications
    Activate report notificationpostList report notificationsgetCreate report notificationpostDeactivate report notificationpostGet report notificationgetDelete report notificationdeleteUpdate report notificationpatch
Cost-Report-Subscriptions
    Activate report notificationpostList report notificationsgetCreate report notificationpostDeactivate report notificationpostGet report notificationgetDelete report notificationdeleteUpdate report notificationpatch
Cost Reports
    List cost reportsgetCreate cost reportpostGet cost reportgetUpdate cost reportputDelete cost reportdeleteGet cost report dataget
Cost-Reports
    List cost reportsgetCreate cost reportpostGet cost reportgetUpdate cost reportputDelete cost reportdeleteGet cost report dataget
Cost Data
    Get cost datagetGet cost forecastgetGet cost summaryget
Costs
    Get cost datagetGet cost forecastgetGet cost summaryget
Cost Alerts
    List cost alertsgetCreate cost alertpostGet cost alertgetUpdate cost alertputDelete cost alertdeleteGet cost alert eventsgetPause cost alertpostResume cost alertpost
Cost-Alerts
    List cost alertsgetCreate cost alertpostGet cost alertgetUpdate cost alertputDelete cost alertdeleteGet cost alert eventsgetPause cost alertpostResume cost alertpost
Contracting
    Get the data processing agreement statusget
Budgets
    List budgetsgetCreate budgetpostGet budgetgetUpdate budgetputDelete budgetdelete
Billing
    Get the account's entitlementgetGet the account's metered usageget
Entitlement
    Get the account's entitlementget
Usage
    Get the account's metered usageget
Anomalies
    Acknowledge anomalypostList anomaliesget
Allocation
    List allocation rulesgetCreate an allocation rulepostUpdate an allocation ruleputDelete an allocation ruledeleteReorder the allocation rule setpostRead allocation coveragegetList segmentsgetCreate a segmentpostUpdate a segmentputDelete a segmentdeletePreview an allocation rulepost
Segments
    List segmentsgetCreate a segmentpostUpdate a segmentputDelete a segmentdelete
Schemas
Costfluent Public API
Costfluent Public API

Allocation

Server
Download schema

List allocation rules

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

Returns the workspace's rules in compiled precedence order. The order is the meaning of the set, so this is also the export.

List allocation rules › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required

List allocation rules › Responses

Success

​CostfluentPublicApiModelsV1ResponsesAllocationRuleResponse[]
CostfluentPublicApiModelsV1ResponsesAllocationRuleResponse
id
​string · required
name
​string · required
priority
​integer · int32 · required
matchField
​string · required
matchOperator
​string · required
matchValue
​string · required
costKind
​string · required
segmentId
​string · required
isEnabled
​boolean · required
createdAt
​string · date-time · required
matchTagKey
​string | null
segmentName
​string | null
costCentre
​string | null
updatedAt
​string | null · date-time
GET/v1/allocation/rules
curl 'https://api.costfluent.com/v1/allocation/rules?workspaceId=[object Object]' \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": "id", "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "costKind": "costKind", "segmentId": "segmentId", "segmentName": "segmentName", "costCentre": "costCentre", "isEnabled": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" } ]
json
application/json

Create an allocation rule

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

Create an allocation rule › Request Body

CostfluentPublicApiEndpointsV1AllocationCreateAllocationRuleRequest
​CostfluentSharedKernelPublicIdsWorkspacePublicId · required
name
​string · required
matchField
​string · required
matchOperator
​string · required
matchValue
​string · required
​CostfluentSharedKernelPublicIdsSegmentPublicId · required
priority
​integer · int32
matchTagKey
​string | null
isEnabled
​boolean

Create an allocation rule › Responses

Success

CostfluentPublicApiModelsV1ResponsesAllocationRuleResponse
id
​string · required
name
​string · required
priority
​integer · int32 · required
matchField
​string · required
matchOperator
​string · required
matchValue
​string · required
costKind
​string · required
segmentId
​string · required
isEnabled
​boolean · required
createdAt
​string · date-time · required
matchTagKey
​string | null
segmentName
​string | null
costCentre
​string | null
updatedAt
​string | null · date-time
POST/v1/allocation/rules
curl https://api.costfluent.com/v1/allocation/rules \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "workspaceId": { "Value": "Value" }, "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "segmentId": { "Value": "Value" }, "isEnabled": true }'
Example Request Body
{ "workspaceId": { "Value": "Value" }, "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "segmentId": { "Value": "Value" }, "isEnabled": true }
json
Example Responses
{ "id": "id", "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "costKind": "costKind", "segmentId": "segmentId", "segmentName": "segmentName", "costCentre": "costCentre", "isEnabled": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Update an allocation rule

PUT
https://api.costfluent.com
/v1/allocation/rules/{ruleId}
Bearer (API token)

Update an allocation rule › path Parameters

​CostfluentSharedKernelPublicIdsAllocationRulePublicId · required

Update an allocation rule › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required

Update an allocation rule › Request Body

CostfluentPublicApiEndpointsV1AllocationUpdateAllocationRuleRequest
name
​string
priority
​integer · int32
matchField
​string
matchOperator
​string
matchValue
​string
matchTagKey
​string | null
​CostfluentSharedKernelPublicIdsSegmentPublicId
isEnabled
​boolean

Update an allocation rule › Responses

Success

CostfluentPublicApiModelsV1ResponsesAllocationRuleResponse
id
​string · required
name
​string · required
priority
​integer · int32 · required
matchField
​string · required
matchOperator
​string · required
matchValue
​string · required
costKind
​string · required
segmentId
​string · required
isEnabled
​boolean · required
createdAt
​string · date-time · required
matchTagKey
​string | null
segmentName
​string | null
costCentre
​string | null
updatedAt
​string | null · date-time
PUT/v1/allocation/rules/{ruleId}
curl 'https://api.costfluent.com/v1/allocation/rules/:ruleId?workspaceId=[object Object]' \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "segmentId": { "Value": "Value" }, "isEnabled": true }'
Example Request Body
{ "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "segmentId": { "Value": "Value" }, "isEnabled": true }
json
Example Responses
{ "id": "id", "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "costKind": "costKind", "segmentId": "segmentId", "segmentName": "segmentName", "costCentre": "costCentre", "isEnabled": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Delete an allocation rule

DELETE
https://api.costfluent.com
/v1/allocation/rules/{ruleId}
Bearer (API token)

Allocation is evaluated at query time, so removing a rule restates every past month immediately.

Delete an allocation rule › path Parameters

​CostfluentSharedKernelPublicIdsAllocationRulePublicId · required

Delete an allocation rule › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required

Delete an allocation rule › Responses

No Content

No data returned
DELETE/v1/allocation/rules/{ruleId}
curl 'https://api.costfluent.com/v1/allocation/rules/:ruleId?workspaceId=[object Object]' \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

Reorder the allocation rule set

POST
https://api.costfluent.com
/v1/allocation/rules/order
Bearer (API token)

Reorder the allocation rule set › Request Body

CostfluentPublicApiEndpointsV1AllocationReorderAllocationRulesRequest
​CostfluentSharedKernelPublicIdsWorkspacePublicId
​CostfluentSharedKernelPublicIdsAllocationRulePublicId[]

Reorder the allocation rule set › Responses

Success

​CostfluentPublicApiModelsV1ResponsesAllocationRuleResponse[]
CostfluentPublicApiModelsV1ResponsesAllocationRuleResponse
id
​string · required
name
​string · required
priority
​integer · int32 · required
matchField
​string · required
matchOperator
​string · required
matchValue
​string · required
costKind
​string · required
segmentId
​string · required
isEnabled
​boolean · required
createdAt
​string · date-time · required
matchTagKey
​string | null
segmentName
​string | null
costCentre
​string | null
updatedAt
​string | null · date-time
POST/v1/allocation/rules/order
curl https://api.costfluent.com/v1/allocation/rules/order \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "workspaceId": { "Value": "Value" }, "ruleIds": [ { "Value": "Value" } ] }'
Example Request Body
{ "workspaceId": { "Value": "Value" }, "ruleIds": [ { "Value": "Value" } ] }
json
Example Responses
[ { "id": "id", "name": "name", "priority": 0, "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "costKind": "costKind", "segmentId": "segmentId", "segmentName": "segmentName", "costCentre": "costCentre", "isEnabled": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" } ]
json
application/json

Read allocation coverage

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

Read allocation coverage › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required
windowStart
​string · date · required
windowEndExclusive
​string · date · required
costBasis
​string · required

Read allocation coverage › Responses

Success

CostfluentFeaturesCostAllocationQueriesAllocationCoverageResponse
windowStart
​string · date
windowEndExclusive
​string · date
costBasis
​string
​CostfluentFeaturesCostAllocationQueriesAllocationCoverageCurrency[]
GET/v1/allocation/coverage
curl 'https://api.costfluent.com/v1/allocation/coverage?workspaceId=[object Object]&windowStart=<string>&windowEndExclusive=<string>&costBasis=<string>' \ --header 'Authorization: Bearer <token>'
Example Responses
{ "windowStart": "2024-08-25", "windowEndExclusive": "2024-08-25", "costBasis": "costBasis", "currencies": [ { "billingCurrency": "billingCurrency", "totalCost": 0, "directCost": 0, "sharedCost": 0, "undistributedSharedCost": 0, "unallocatedCost": 0, "unallocatedRecordCount": 0, "recordCount": 0, "coverage": 0, "segments": [ { "segmentId": "segmentId", "name": "name", "costCentre": "costCentre", "directCost": 0, "sharedCost": 0, "allocatedCost": 0, "recordCount": 0 } ] } ] }
json
application/json

List segments

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

Returns every segment cost can be assigned to in a workspace

List segments › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required

List segments › Responses

Success

​CostfluentPublicApiModelsV1ResponsesSegmentResponse[]
CostfluentPublicApiModelsV1ResponsesSegmentResponse
id
​string · required
teamLabel
​string · required
product
​string · required
costCentre
​string · required
isShared
​boolean · required
createdAt
​string · date-time · required
teamId
​string | null
teamName
​string | null
updatedAt
​string | null · date-time
GET/v1/segments
curl 'https://api.costfluent.com/v1/segments?workspaceId=[object Object]' \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": "id", "teamId": "teamId", "teamLabel": "teamLabel", "teamName": "teamName", "product": "product", "costCentre": "costCentre", "isShared": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" } ]
json
application/json

Create a segment

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

Create a segment › Request Body

CostfluentPublicApiEndpointsV1AllocationCreateSegmentRequest
​CostfluentSharedKernelPublicIdsWorkspacePublicId · required
​
teamLabel
​string | null
product
​string
costCentre
​string
isShared
​boolean

Create a segment › Responses

Success

CostfluentPublicApiModelsV1ResponsesSegmentResponse
id
​string · required
teamLabel
​string · required
product
​string · required
costCentre
​string · required
isShared
​boolean · required
createdAt
​string · date-time · required
teamId
​string | null
teamName
​string | null
updatedAt
​string | null · date-time
POST/v1/segments
curl https://api.costfluent.com/v1/segments \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "workspaceId": { "Value": "Value" }, "teamId": { "Value": "Value" }, "teamLabel": "teamLabel", "product": "product", "costCentre": "costCentre", "isShared": true }'
Example Request Body
{ "workspaceId": { "Value": "Value" }, "teamId": { "Value": "Value" }, "teamLabel": "teamLabel", "product": "product", "costCentre": "costCentre", "isShared": true }
json
Example Responses
{ "id": "id", "teamId": "teamId", "teamLabel": "teamLabel", "teamName": "teamName", "product": "product", "costCentre": "costCentre", "isShared": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Update a segment

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

Update a segment › path Parameters

​CostfluentSharedKernelPublicIdsSegmentPublicId · required

Update a segment › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required

Update a segment › Request Body

CostfluentPublicApiEndpointsV1AllocationUpdateSegmentRequest
​
teamLabel
​string | null
product
​string
costCentre
​string

Update a segment › Responses

Success

CostfluentPublicApiModelsV1ResponsesSegmentResponse
id
​string · required
teamLabel
​string · required
product
​string · required
costCentre
​string · required
isShared
​boolean · required
createdAt
​string · date-time · required
teamId
​string | null
teamName
​string | null
updatedAt
​string | null · date-time
PUT/v1/segments/{segmentId}
curl 'https://api.costfluent.com/v1/segments/:segmentId?workspaceId=[object Object]' \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "teamId": { "Value": "Value" }, "teamLabel": "teamLabel", "product": "product", "costCentre": "costCentre" }'
Example Request Body
{ "teamId": { "Value": "Value" }, "teamLabel": "teamLabel", "product": "product", "costCentre": "costCentre" }
json
Example Responses
{ "id": "id", "teamId": "teamId", "teamLabel": "teamLabel", "teamName": "teamName", "product": "product", "costCentre": "costCentre", "isShared": true, "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Delete a segment

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

Refused while any rule still assigns cost to it

Delete a segment › path Parameters

​CostfluentSharedKernelPublicIdsSegmentPublicId · required

Delete a segment › query Parameters

​CostfluentSharedKernelPublicIdsWorkspacePublicId · required

Delete a segment › Responses

No Content

No data returned
DELETE/v1/segments/{segmentId}
curl 'https://api.costfluent.com/v1/segments/:segmentId?workspaceId=[object Object]' \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

Preview an allocation rule

POST
https://api.costfluent.com
/v1/allocation/rules/preview
Bearer (API token)

Computes what the rule would move without creating it. Allocation is evaluated at query time, so enabling a rule restates history immediately.

Preview an allocation rule › Request Body

CostfluentPublicApiEndpointsV1AllocationPreviewAllocationRuleRequest
​CostfluentSharedKernelPublicIdsWorkspacePublicId · required
windowStart
​string · date · required
windowEndExclusive
​string · date · required
matchField
​string · required
matchOperator
​string · required
matchValue
​string · required
​CostfluentSharedKernelPublicIdsSegmentPublicId · required
matchTagKey
​string | null
priority
​integer · int32

Preview an allocation rule › Responses

Success

​CostfluentPublicApiModelsV1ResponsesAllocationDryRunResponse[]
CostfluentPublicApiModelsV1ResponsesAllocationDryRunResponse
billingCurrency
​string · required
movedCost
​number · double · required
movedRecordCount
​integer · int64 · required
coverageBefore
​number · double · required
coverageAfter
​number · double · required
​CostfluentPublicApiModelsV1ResponsesAllocationDryRunSegmentChangeResponse[] · required
POST/v1/allocation/rules/preview
curl https://api.costfluent.com/v1/allocation/rules/preview \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "workspaceId": { "Value": "Value" }, "windowStart": "2024-08-25", "windowEndExclusive": "2024-08-25", "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "segmentId": { "Value": "Value" }, "priority": 0 }'
Example Request Body
{ "workspaceId": { "Value": "Value" }, "windowStart": "2024-08-25", "windowEndExclusive": "2024-08-25", "matchField": "matchField", "matchOperator": "matchOperator", "matchValue": "matchValue", "matchTagKey": "matchTagKey", "segmentId": { "Value": "Value" }, "priority": 0 }
json
Example Responses
[ { "billingCurrency": "billingCurrency", "movedCost": 0, "movedRecordCount": 0, "coverageBefore": 0, "coverageAfter": 0, "segmentChanges": [ { "name": "name", "costCentre": "costCentre", "allocatedBefore": 0, "allocatedAfter": 0, "delta": 0 } ] } ]
json
application/json

AnomaliesSegments