Cloud Cost Management

Upload Custom Costs file

Upload a Custom Costs file.

put/api/v2/cost/custom_costs

Request

  • Base URL
    https://api.datadoghq.com
  • URL
    https://api.datadoghq.com/api/v2/cost/custom_costs
  • Auth
    • API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
    • or OAuth 2
      Authorization code: /oauth2/v1/authorize
      Token URL: /oauth2/v1/token scopes: cloud_cost_management_write

Request body

BilledCostnumber double

Total cost in the cost file.

BillingCurrencystring

Currency used in the Custom Costs file.

ChargeDescriptionstring

Description for the line item cost.

ChargePeriodEndstring

End date of the usage charge.

ChargePeriodStartstring

Start date of the usage charge.

ProviderNamestring

Name of the provider for the line item.

Tagsobject

Additional tags for the line item.

Example request

[
  {
    "BilledCost": 100.5,
    "BillingCurrency": "USD",
    "ChargeDescription": "Monthly usage charge for my service",
    "ChargePeriodEnd": "2023-02-28",
    "ChargePeriodStart": "2023-02-01"
  }
]

Response

Accepted

Example response

{
  "data": {
    "attributes": {
      "billed_cost": 100.5,
      "billing_currency": "USD",
      "charge_period": {
        "end": 1706745600000,
        "start": 1704067200000
      },
      "name": "my_file.json",
      "provider_names": [
        "my_provider"
      ],
      "status": "active",
      "uploaded_at": 1704067200000,
      "uploaded_by": {
        "email": "email.test@datadohq.com",
        "icon": "icon.png",
        "name": "Test User"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.