Cloud Cost Management
Update Custom Costs file
Changed onMark whether a Custom Costs file holds AI provider costs. Datadog then recomputes the costs for the months that the file covers.
patch/api/v2/cost/custom_costs/{file_id}
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/tokenScopescloud_cost_management_write
Path parameters
file_idstring required
File ID.
Request body
Example request
{
"data": {
"attributes": {
"ai_provider": true
},
"id": "00000000-0000-0000-0000-000000000007",
"type": "cost_metadata"
}
}Response
OK
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
- info
endpoint added
- info