{ "opencollection": "1.0.0", "info": { "name": "Datadog Account Monthly API", "version": "1.0" }, "request": { "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "items": [ { "info": { "name": "Monthly", "type": "folder" }, "items": [ { "info": { "name": "Datadog Get Monthly Cost Attribution", "type": "http" }, "http": { "method": "GET", "url": "https://{subdomain}.{site}/api/v2/cost_by_tag/monthly_cost_attribution", "params": [ { "name": "start_month", "value": "example_value", "type": "query", "description": "Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning in this month." }, { "name": "end_month", "value": "example_value", "type": "query", "description": "Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month." }, { "name": "fields", "value": "example_value", "type": "query", "description": "Comma-separated list specifying cost types (e.g., `_on_demand_cost`, `_committed_cost`, `_total_cost`) and the\nproportions (`_percentage_in_org`, `_percentage_in_account`). Use `*` to retrieve all fields.\nExample: `infra_host_on_demand_cost,infra_host_percentage_in_account`\nTo obtain the complete list of active billing dimensions that can be used to replace\n`` in the field names, make a request to the [Get active billing dimensions API](https://docs.datadoghq.com/api/latest/usage-metering/#get-active-billing-dimensions-for-cost-attribution)." }, { "name": "sort_direction", "value": "example_value", "type": "query", "description": "The direction to sort by: `[desc, asc]`." }, { "name": "sort_name", "value": "Example Monitor", "type": "query", "description": "The billing dimension to sort by. Always sorted by total cost. Example: `infra_host`." }, { "name": "tag_breakdown_keys", "value": "env:production", "type": "query", "description": "Comma separated list of tag keys used to group cost. If no value is provided the cost will not be broken down by tags.\nTo see which tags are available, look for the value of `tag_config_source` in the API response." }, { "name": "next_record_id", "value": "abc-123-def", "type": "query", "description": "List following results with a next_record_id provided in the previous query." }, { "name": "include_descendants", "value": "true", "type": "query", "description": "Include child org cost in the response. Defaults to `true`." } ], "auth": { "type": "apikey", "key": "DD-API-KEY", "value": "{{DD-API-KEY}}", "placement": "header" } }, "docs": "Get monthly cost attribution by tag across multi-org and single root-org accounts.\nCost Attribution data for a given month becomes available no later than the 19th of the following month.\nThis API endpoint is paginated. To make sure you receive all records, check if the value of `next_record_id` is\nset in the response. If it is, make another request and pass `next_record_id` as a parameter.\nPseudo code example:\n```\nresponse := GetMonthlyCostAttribution(start_month, end_month)\ncursor := response." } ] } ], "bundled": true }