Get a budget's custom forecast

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.ap2.datadoghq.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.datadoghq.eu/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.ddog-gov.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.us2.ddog-gov.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.uk1.datadoghq.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.datadoghq.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.us3.datadoghq.com/api/v2/cost/budget/{budget_id}/custom-forecasthttps://api.us5.datadoghq.com/api/v2/cost/budget/{budget_id}/custom-forecast

Overview

Get the custom forecast for a budget.

Arguments

Path Parameters

Name

Type

Description

budget_id [required]

string

Budget id.

Response

OK

Response object containing the custom forecast for a budget.

Expand All

Field

Type

Description

data [required]

object

Custom forecast resource wrapper in a response.

attributes [required]

object

Attributes of a custom forecast.

budget_uid [required]

string

The UUID of the budget that this custom forecast belongs to.

created_at [required]

int64

Timestamp the custom forecast was created, in Unix milliseconds.

created_by [required]

string

The id of the user that created the custom forecast.

entries [required]

[object]

Monthly custom forecast entries.

amount [required]

double

Forecast amount for the month.

month [required]

int64

Month the custom forecast entry applies to, in YYYYMM format.

tag_filters [required]

[object]

Tag filters that scope this custom forecast entry to specific resources.

tag_key [required]

string

The tag key to filter on.

tag_value [required]

string

The tag value to filter on.

updated_at [required]

int64

Timestamp the custom forecast was last updated, in Unix milliseconds.

updated_by [required]

string

The id of the user that last updated the custom forecast.

id [required]

string

The unique identifier of the custom forecast.

type [required]

enum

The type of the custom forecast resource. Must be custom_forecast. Allowed enum values: custom_forecast

default: custom_forecast

{
  "data": {
    "attributes": {
      "budget_uid": "00000000-0000-0000-0000-000000000001",
      "created_at": 1738258683590,
      "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a",
      "entries": [
        {
          "amount": 400,
          "month": 202501,
          "tag_filters": [
            {
              "tag_key": "service",
              "tag_value": "ec2"
            }
          ]
        }
      ],
      "updated_at": 1738258683590,
      "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"
    },
    "id": "11111111-1111-1111-1111-111111111111",
    "type": "custom_forecast"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Path parameters
export budget_id="CHANGE_ME"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/cost/budget/${budget_id}/custom-forecast" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"