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

Segments

Server
Download schema

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

Allocation