billing.costs.compareThe same usage priced at other clouds’ public list prices
A read behind a POST. For the query’s window and filters: instance hours (matched to each provider’s cheapest machine of the same CPU class and architecture with at least the vCPUs and memory, named in `matches`), managed PostgreSQL node hours (matched to the provider’s cheapest managed PostgreSQL server with at least the vCPUs and memory: RDS, Azure Flexible Server, STACKIT Flex; counted at our price and named in `partial` where none is read), block and object storage GB-months, priced at each reference provider’s list price (`providers`: name, region, matched machines), read weekly from their public price lists with `pricesFrom` and `sources`; a provider without a verified price list says so in `missing`. The provider whose servers we resell is priced at its list price (what we bill divided by our markup, ×1 today) and its matches say so; it sells no managed PostgreSQL, so a database node is its bare server there. Usage that is metered and not charged yet is left out (`notChargedEur`); everything else (requests, tokens, traffic, other managed services’ nodes, …) is `notComparedEur`. No free tiers, commitments or discounts are applied anywhere.
Request syntax
POST /billing/api/cost-explorer/compare
{
"start": "string",
"end": "string",
"granularity": "enum",
"groupBy": "object",
"filters": "array of json",
"maxGroups": "number"
}Request body
startRequiredstring
First day of the window, YYYY-MM-DD, UTC, inclusive
Constraints: /^\d{4}-\d{2}-\d{2}$/
endRequiredstring
Last day of the window, YYYY-MM-DD, UTC, inclusive; not before start, and the window is at most 400 days
Constraints: /^\d{4}-\d{2}-\d{2}$/
granularityOptionalenum
Width of each bar: hour (windows of at most 14 days), day (default) or month
One of:
hour,day,monthDefault:
"day"groupByOptionalobject
What the bars are stacked by: {dimension, tagKey}; default {dimension: service}
Constraints: JSON
Default:
{"dimension":"service"}filtersOptionalarray of json
Narrow to rows matching every filter, at most 20: {dimension, values, tagKey, exclude}; default none
Default:
[]maxGroupsOptionalnumber
Groups drawn on their own, 1–50 (default 8); the rest are summed into "Other"
Constraints: integer, 1-50
Default:
8
Response
200 with { ourComparableEur, notComparedEur, notComparedServices, notChargedEur, ourByService, providers }, euros as numbers; each provider: provider, label, totalEur (null when a price is missing), diffEur and diffPercent (positive: they cost more), byService, matches [{ ours, theirs, note, eurPerHour }], pricesFrom, sources, missing, partial. granularity, groupBy and maxGroups are accepted and do not change the answer; filter values must be ids here (names are not looked up). 403 when filtering by provider 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:GetCostAndUsage 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 costs compare --start example --end examplecurl -X POST "https://console.platform.deutschecloud.app/billing/api/cost-explorer/compare" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"start":"example","end":"example"}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_billing_costs_compare.