Costfluent Public API

List providers

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

Returns all connected providers for the authenticated organization.

Needs a token with viewProviders; a workspace token lists its own workspace only.

List providers › query Parameters

type
​string
page
​integer · int32

The page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.

Default: 1
limit
​integer · int32

Items per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.

Default: 20

List providers › Responses

Success


Connect provider

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

Connects a new cloud provider, platform, or integration for cost monitoring.

Needs an organization token with manageProviders.

Connect provider › Headers

Idempotency-Key
​string · minLength: 1 · maxLength: 255

A unique value, at most 255 printable ASCII characters, such as a UUID, that makes retrying this create safe. A retry with the same key and the same request within 24 hours answers the first response again, marked Idempotent-Replayed: true, and creates nothing; the same key with another request answers 422 idempotency_key_reused. A key is kept only for a create that succeeded. Without it, every request creates.

Connect provider › Request Body

key
​ProviderKey · required
​object · required
displayName
​string | null · minLength: 0 · maxLength: 255
description
​string | null · minLength: 0 · maxLength: 1000
​
externalId
​string | null
​object | null
syncFrequencyMinutes
​integer · int32 · min: 60 · max: 1440

Connect provider › Responses

Created

id
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required
type
​ProviderType · required
key
​ProviderKey · required
displayName
​string · required

Get provider

GET
https://api.costfluent.com
/v1/providers/{providerId}
Bearer (API token)

Returns details of a specific provider.

Needs an organization token with viewProviders.

Get provider › path Parameters

providerId
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required

Get provider › Responses

Success

id
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required
type
​ProviderType · required
key
​ProviderKey · required
displayName
​string · required
status
​ProviderStatus · required
syncFrequencyMinutes
​integer · int32 · required
createdAt
​string · date-time · required
description
​string | null
​
externalId
​string | null
lastSyncAt
​string | null · date-time
lastSyncStatus
​string | null
lastSyncError
​string | null
nextSyncAt
​string | null · date-time
updatedAt
​string | null · date-time

Update provider

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

Updates a provider in place: its display name, description, settings, credentials or sync frequency. A field left out keeps its value; clearDescription and clearSettings remove theirs. An update that another write to the provider overtook, or whose credentials or settings changed while the new credentials or export location were verified, answers 409 concurrency_conflict and changes nothing.

Needs an organization token with manageProviders.

Update provider › path Parameters

providerId
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required

Update provider › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Update provider › Request Body

displayName
​string | null
description
​string | null · minLength: 0 · maxLength: 1000
clearDescription
​boolean
externalId
​string | null
​object | null
​object | null
clearSettings
​boolean
syncFrequencyMinutes
​integer | null · int32 · min: 60 · max: 1440

Update provider › Responses

Success

id
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required
type
​ProviderType · required
key
​ProviderKey · required
displayName
​string · required
status
​ProviderStatus · required
syncFrequencyMinutes
​integer · int32 · required
createdAt
​string · date-time · required
description
​string | null
​
externalId
​string | null
lastSyncAt
​string | null · date-time
lastSyncStatus
​string | null
lastSyncError
​string | null
nextSyncAt
​string | null · date-time
updatedAt
​string | null · date-time

Delete provider

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

Disconnects a provider: its stored credentials are deleted, every workspace stops counting it at once, and the cost data it imported is then erased. Reports, budgets and alerts stay. This cannot be undone. Refused with 409 conflict while child providers depend on it, and with 409 concurrency_conflict when another write to the provider overtook the delete.

Needs an organization token with manageProviders.

Delete provider › path Parameters

providerId
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required

Delete provider › Headers

If-Match
​string

Applies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.

Delete provider › Responses

No Content

No data returned

Get available providers

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

Returns all supported provider types and their configuration requirements.

Needs any valid token.

Get available providers › query Parameters

page
​integer · int32

The page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.

Default: 1
limit
​integer · int32

Items per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.

Default: 20

Get available providers › Responses

Success


Get the AWS connector

GET
https://api.costfluent.com
/v1/providers/aws/connector
Bearer (API token)

Returns the Costfluent principal and this organization's external ID that an AWS IAM role must trust before it is connected. Stable for the organization; read-only.

Needs an organization token with manageProviders.

Get the AWS connector › Responses

Success

principalArn
​string · required
externalId
​string · required
region
​string · required
templateUrl
​string | null

Get provider sync history

GET
https://api.costfluent.com
/v1/providers/{providerId}/sync-history
Bearer (API token)

Returns the provider's newest 100 collection runs, newest first, paged. A run with status PartialFailure published incomplete data: quarantinedCount rows could not be imported.

Needs an organization token with viewProviders.

Get provider sync history › path Parameters

providerId
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required

Get provider sync history › query Parameters

page
​integer · int32

The page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.

Default: 1
limit
​integer · int32

Items per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.

Default: 20

Get provider sync history › Responses

Success


Provision the GCP service account

POST
https://api.costfluent.com
/v1/providers/gcp/service-account
Bearer (API token)

Returns the service account this organization grants BigQuery Data Viewer on its GCP billing export dataset to, creating it on the first call. Idempotent.

Needs an organization token with manageProviders.

Provision the GCP service account › Responses

Success

serviceAccountEmail
​string · required
organizationId
​string | null · pattern: ^[0-9]+$
directoryCustomerId
​string | null

Test provider connection

POST
https://api.costfluent.com
/v1/providers/{providerId}/test
Bearer (API token)

Validates credentials and connectivity to the provider. A test whose provider's credentials or settings changed while it ran answers 409 concurrency_conflict and records nothing. A connection is tested at most once a minute with the same credentials and settings; a test sooner answers 429 rate_limit_exceeded with Retry-After and asks the provider nothing.

Needs an organization token with manageProviders.

Test provider connection › path Parameters

providerId
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required

Test provider connection › Responses

Success

success
​boolean · required
message
​string | null
​object | null

Trigger provider sync

POST
https://api.costfluent.com
/v1/providers/{providerId}/sync
Bearer (API token)

Initiates a cost data sync from the provider. Use fullSync=true for complete re-sync.

Needs an organization token with syncProviders.

Trigger provider sync › path Parameters

providerId
​ProviderPublicId · pattern: ^prv_[A-Za-z0-9_-]{2… · required

Trigger provider sync › Request Body

fullSync
​boolean

Trigger provider sync › Responses

Success

triggered
​boolean · required
message
​string | null