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 rate limits

How the Costfluent Public API limits each token's requests, and how to back off when it answers 429.

Each API token has its own request budget per minute and per hour. A busy integration on one token never slows another token down. A request without a token shares one budget with every other anonymous caller.

When a request is refused

A request over the budget answers 429 with the error body, code rate_limit_exceeded and retryable true. Its detail names the limit and its window. Four headers say when to try again:

HeaderValue
RateLimit-LimitThe requests the window that refused this one allows.
RateLimit-RemainingThe requests left in that window: 0.
RateLimit-ResetSeconds until the window lets a request through again.
Retry-AfterThe same seconds as RateLimit-Reset.

Back off

  1. On a 429, read Retry-After, or RateLimit-Reset when a proxy dropped it.
  2. Wait that many seconds, then send the same request again.
  3. When the wait is long, such as most of an hour, the hourly budget is spent: stop and resume later rather than holding the request open.

The Terraform provider does this for you: it waits out a short Retry-After and reports a long one as an error.

How it behaves

  • The budget belongs to the token, whatever client or address sends it. A header such as X-Client-Id does not open a new budget.
  • Only Authorization: Bearer carries a token. A token sent any other way, such as an X-Api-Key header, is not read, so an operation that needs a token answers 401.
  • A 429 is refused before the operation runs, so retrying it is safe for every method, a create included.
  • Reading cost data with limit=5000 costs one request per 5,000 rows; see Pagination.

Related

  • Errors
  • Pagination
  • Authentication
Public API errorsPublic API data formats
On this page
  • When a request is refused
  • Back off
  • How it behaves
  • Related