Costfluent Docs
  • Pricing
  • Changelog
  • costfluent.com
  • Documentation
  • Guides
  • API Reference
Product
  • Pricing
  • Security
  • Changelog
Developers
  • API reference
  • Terraform
  • llms.txt
Legal
  • Privacy
  • Terms
  • Imprint
Information
Workspaces
    List workspacesgetCreate workspacepostGet workspacegetUpdate workspaceputDelete workspacedelete
Workspace Providers
    List workspace providersgetCreate workspace providerpostGet workspace providergetUpdate workspace providerputDelete workspace providerdelete
Virtual Tags
    List virtual tagsgetCreate virtual tagpostGet virtual taggetDelete virtual tagdeleteUpdate virtual tagpatch
Utility
    Get current token infogetHealth checkget
Users
    List usersgetInvite userpostGet userget
Teams
    List teamsgetCreate teampostGet teamgetUpdate teamputDelete teamdeleteAdd team memberpostUpdate team memberputRemove team memberdeleteList team workspace accessgetSet team workspace accessputRemove team workspace accessdelete
Tags
    Get tag keygetDelete tag keydeleteList tag keysget
Saved Filters
    List saved filtersgetCreate saved filterpostGet saved filtergetUpdate saved filterputDelete saved filterdelete
Providers
    List providersgetConnect providerpostGet providergetUpdate providerputDelete providerdeleteGet available providersgetGet the AWS connectorgetGet provider sync historygetProvision the GCP service accountpostTest provider connectionpostTrigger provider syncpost
Kubernetes
    Report Kubernetes usagepost
Folders
    List foldersgetCreate folderpostGet foldergetUpdate folderputDelete folderdeleteSet folder saved filterput
Exchange Rates
    Get available currenciesgetGet exchange rategetGet the workspace's exchange rate policygetList exchange ratesget
Dashboards
    List dashboardsgetCreate dashboardpostCreate dashboard widgetpostGet dashboardgetUpdate dashboardputDelete dashboarddeleteGet dashboard widgetgetUpdate dashboard widgetputDelete dashboard widgetdeleteSet dashboard saved filterput
Custom Provider
    List uploadsgetUpload cost filespostGet uploadgetDelete uploaddeleteSubmit costs batchpost
Report Notifications
    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 Filters
    Translate a cost filterget
Cost Data
    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
Contracting
    Get the data processing agreement statusget
Business Metrics
    List business metricsgetCreate business metricpostGet business metricgetUpdate business metricputDelete business metricdeleteList business metric valuesgetImport business metric valuespost
Budgets
    List budgetsgetCreate budgetpostGet budgetgetUpdate budgetputDelete budgetdelete
Billing
    Get the account's entitlementgetGet the account's metered usageget
Audit Logs
    List audit logget
Apps
    List appsgetCreate apppostGet appgetUpdate appputDelete appdelete
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
Schemas
Costfluent Public API
Costfluent Public API

Business Metrics

Download schema

List business metrics

GET
https://api.costfluent.com
/v1/business-metrics
Bearer (API token)

Returns a workspace's business metrics

List business metrics › query Parameters

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

List business metrics › Responses

Success

PaginatedResponseOfBusinessMetricResponse
​PaginationLinks · required
​BusinessMetricResponse[] · required
GET/v1/business-metrics
curl 'https://api.costfluent.com/v1/business-metrics?workspaceId=<string>&page=<number>&limit=<number>' \ --header 'Authorization: Bearer <token>'
Example Responses
{ "links": { "self": "self", "first": "first", "prev": "prev", "next": "next", "last": "last" }, "data": [ { "id": "id", "name": "name", "unit": "unit", "labelColumns": [ "string" ], "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" } ] }
json
application/json

Create business metric

POST
https://api.costfluent.com
/v1/business-metrics
Bearer (API token)

Creates a business metric whose daily values a cost report divides cost by

Create business metric › Request Body

CreateBusinessMetricRequest
workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
name
​string · required
unit
​string · required
labelColumns
​array | null

Create business metric › Responses

Created

BusinessMetricResponse
id
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required
name
​string · required
unit
​string · required
labelColumns
​string[] · required
createdAt
​string · date-time
updatedAt
​string | null · date-time
POST/v1/business-metrics
curl https://api.costfluent.com/v1/business-metrics \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "workspaceId": "workspaceId", "name": "name", "unit": "unit", "labelColumns": [ "string" ] }'
Example Request Body
{ "workspaceId": "workspaceId", "name": "name", "unit": "unit", "labelColumns": [ "string" ] }
json
Example Responses
{ "id": "id", "name": "name", "unit": "unit", "labelColumns": [ "string" ], "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Get business metric

GET
https://api.costfluent.com
/v1/business-metrics/{metricId}
Bearer (API token)

Returns one business metric

Get business metric › path Parameters

metricId
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required

Get business metric › query Parameters

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

Get business metric › Responses

Success

BusinessMetricResponse
id
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required
name
​string · required
unit
​string · required
labelColumns
​string[] · required
createdAt
​string · date-time
updatedAt
​string | null · date-time
GET/v1/business-metrics/{metricId}
curl 'https://api.costfluent.com/v1/business-metrics/:metricId?workspaceId=<string>' \ --header 'Authorization: Bearer <token>'
Example Responses
{ "id": "id", "name": "name", "unit": "unit", "labelColumns": [ "string" ], "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Update business metric

PUT
https://api.costfluent.com
/v1/business-metrics/{metricId}
Bearer (API token)

Renames a business metric or its unit; its label columns stay

Update business metric › path Parameters

metricId
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required

Update business metric › query Parameters

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

Update business metric › Request Body

UpdateBusinessMetricRequest
name
​string | null
unit
​string | null

Update business metric › Responses

Success

BusinessMetricResponse
id
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required
name
​string · required
unit
​string · required
labelColumns
​string[] · required
createdAt
​string · date-time
updatedAt
​string | null · date-time
PUT/v1/business-metrics/{metricId}
curl 'https://api.costfluent.com/v1/business-metrics/:metricId?workspaceId=<string>' \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "name": "name", "unit": "unit" }'
Example Request Body
{ "name": "name", "unit": "unit" }
json
Example Responses
{ "id": "id", "name": "name", "unit": "unit", "labelColumns": [ "string" ], "createdAt": "2024-08-25T15:00:00Z", "updatedAt": "2024-08-25T15:00:00Z" }
json
application/json

Delete business metric

DELETE
https://api.costfluent.com
/v1/business-metrics/{metricId}
Bearer (API token)

Deletes a business metric and its values; a report charting its unit cost goes back to cost alone

Delete business metric › path Parameters

metricId
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required

Delete business metric › query Parameters

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

Delete business metric › Responses

No Content

No data returned
DELETE/v1/business-metrics/{metricId}
curl 'https://api.costfluent.com/v1/business-metrics/:metricId?workspaceId=<string>' \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

List business metric values

GET
https://api.costfluent.com
/v1/business-metrics/{metricId}/values
Bearer (API token)

Returns a business metric's values between two days, both included, by day

List business metric values › path Parameters

metricId
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required

List business metric values › query Parameters

workspaceId
​WorkspacePublicId · pattern: ^wsp_[A-Za-z0-9_-]{2… · required
page
​integer · int32 · required
limit
​integer · int32 · required
from
​string | null · date
to
​string | null · date

List business metric values › Responses

Success

PaginatedResponseOfBusinessMetricValueResponse
​PaginationLinks · required
​BusinessMetricValueResponse[] · required
GET/v1/business-metrics/{metricId}/values
curl 'https://api.costfluent.com/v1/business-metrics/:metricId/values?workspaceId=<string>&page=<number>&limit=<number>' \ --header 'Authorization: Bearer <token>'
Example Responses
{ "links": { "self": "self", "first": "first", "prev": "prev", "next": "next", "last": "last" }, "data": [ { "date": "2024-08-25", "amount": "amount", "labels": { "key": "string" } } ] }
json
application/json

Import business metric values

POST
https://api.costfluent.com
/v1/business-metrics/{metricId}/values
Bearer (API token)

Stores dated values, each replacing the amount the metric holds for its day and labels, so a repeated request changes nothing

Import business metric values › path Parameters

metricId
​BusinessMetricPublicId · pattern: ^bmt_[A-Za-z0-9_-]{2… · required

Import business metric values › query Parameters

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

Import business metric values › Request Body

ImportBusinessMetricValuesRequest
​array | null

Import business metric values › Responses

Success

BusinessMetricImportResponse
created
​integer · int32 · required
updated
​integer · int32 · required
unchanged
​integer · int32 · required
POST/v1/business-metrics/{metricId}/values
curl 'https://api.costfluent.com/v1/business-metrics/:metricId/values?workspaceId=<string>' \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "values": [ { "date": "2024-08-25", "amount": "amount", "labels": { "key": "string" } } ] }'
Example Request Body
{ "values": [ { "date": "2024-08-25", "amount": "amount", "labels": { "key": "string" } } ] }
json
Example Responses
{ "created": 0, "updated": 0, "unchanged": 0 }
json
application/json

ContractingBudgets