billing.cost-views.updateChange a saved view, its sharing or its monthly mail
Request syntax
PATCH /billing/api/cost-views/{id}
{
"name": "string",
"description": "string",
"state": "object",
"shared": "boolean",
"report": "object"
}Path parameters
idRequiredstring
Constraints: uuid
Request body
nameOptionalstring
1–100 characters, trimmed; unique in the organization (409 when taken)
Constraints: 1-100 chars
descriptionOptionalstring
New description, at most 500 characters; omitted: unchanged
Constraints: max 500 chars
stateOptionalobject
The explorer question: range (relative preset or fixed dates), granularity, groupBy, filters — the same shapes as cost-explorer/query. Grouping or filtering by provider needs iam:UpdateOrganization (403)
Constraints: JSON
sharedOptionalboolean
true: visible to everyone with billing:GetCostAndUsage; false: only to its creator; omitted: unchanged
reportOptionalobject
Replace the monthly mail settings: {enabled, recipients (at most 20 addresses)}; omitted: unchanged
Constraints: JSON
Response
200 with the view after the change, as `list` shows it. 409 when the new name is taken; 404 when it is not in your organization or is someone else’s private view; 403 for a provider dimension without iam:UpdateOrganization.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow billing:UpdateCostView on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud billing cost-views update idcurl -X PATCH "https://console.platform.deutschecloud.app/billing/api/cost-views/id" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_billing_cost-views_update.