Costfluent Docs
  • Pricing
  • Changelog
  • costfluent.com
  • Documentation
  • Guides
  • API Reference
Product
  • Pricing
  • Security
  • Changelog
Developers
  • API reference
  • Terraform
  • llms.txt
Legal
  • Privacy
  • Terms
  • Imprint
Get started
Concepts
Connect a source
Reporting
Allocation
Planning
Optimization
Administration
Developers
    Public API authenticationPublic API versioningPublic API paginationPublic API errorsPublic API rate limitsPublic API data formatsWebhook notificationsTerraform
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
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 folderdelete
Exchange Rates
    Get available currenciesgetGet exchange rategetGet the workspace's exchange rate policygetList exchange ratesget
Dashboards
    List dashboardsgetCreate dashboardpostGet dashboardgetUpdate dashboardputDelete dashboarddelete
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
Budgets
    List budgetsgetCreate budgetpostGet budgetgetUpdate budgetputDelete budgetdelete
Billing
    Get the account's entitlementgetGet 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
Schemas
Developers

Public API pagination

Read a Costfluent Public API list one page at a time with page and limit, and follow its links to the next page.

Every list operation answers with the same envelope: the page's items in data, and links to the neighbouring pages in links. Cost data adds what the whole query covers in meta.

Read a list page by page

  1. Request the first page with page=1 and the limit you want.
  2. Process data.
  3. When links.next is set, request that link; it keeps every filter of the first request. When it is null, that was the last page.
TerminalCode
curl --get https://api.costfluent.com/v1/budgets \ --data page=1 --data limit=100 \ --header "Authorization: Bearer $COSTFLUENT_API_TOKEN"
Code
{ "links": { "self": "https://api.costfluent.com/v1/budgets?page=1&limit=100", "first": "https://api.costfluent.com/v1/budgets?page=1&limit=100", "prev": null, "next": "https://api.costfluent.com/v1/budgets?page=2&limit=100", "last": "https://api.costfluent.com/v1/budgets?page=3&limit=100" }, "data": [] }

Page size

OperationlimitDefault
Every list, such as budgets, cost reports or integrations1 to 100; a larger or smaller value is held to that range20
Cost data, GET /v1/costs1 to 5,000; a larger value is refused with 40020

Reading cost data in bulk

Cost data is the one bulk read: ask for limit=5000 to read a window in as few requests as possible. Paging reaches 100,000 rows, page × limit; a request past that is refused with 400, and its error says to split the date window. Read a large window as several shorter startDate to endDate ranges, each from page 1.

meta.totalRecords counts every row the query matches, so meta.totalRecords divided by limit tells you how many pages to expect before you start.

How it behaves

  • page starts at 1. A page past the end answers 200 with an empty data.
  • links.last is null when the total is not known.

Related

  • Rate limits
  • Errors
  • API reference
Public API versioningPublic API errors
On this page
  • Read a list page by page
  • Page size
  • Reading cost data in bulk
  • How it behaves
  • Related
JSON