Allocation
List allocation rules
Returns the workspace's rules in compiled precedence order, paged. The order is the meaning of the set, so reading every page in turn is also the export.
Needs a token with viewCostAllocation on the workspace.
query Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredpageThe page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.
limitItems per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.
List allocation rules › Responses
Success
Create an allocation rule
Needs a token with manageCostAllocation on the workspace.
Headers
Idempotency-KeyA unique value, at most 255 printable ASCII characters, such as a UUID, that makes retrying this create safe. A retry with the same key and the same request within 24 hours answers the first response again, marked Idempotent-Replayed: true, and creates nothing; the same key with another request answers 422 idempotency_key_reused. A key is kept only for a create that succeeded. Without it, every request creates.
Create an allocation rule › Request Body
workspaceId^wsp_[A-Za-z0-9_-]{2… · requirednamefiltersegmentId^seg_[A-Za-z0-9_-]{2… · requiredpriorityisEnabledCreate an allocation rule › Responses
Created
id^alr_[A-Za-z0-9_-]{2… · requirednamepriorityfiltercostKindsegmentId^seg_[A-Za-z0-9_-]{2… · requiredisEnabledcreatedAtsegmentNamecostCentreupdatedAtUpdate an allocation rule
Needs a token with manageCostAllocation on the workspace.
path Parameters
ruleId^alr_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredHeaders
If-MatchApplies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.
Update an allocation rule › Request Body
namefiltersegmentId^seg_[A-Za-z0-9_-]{2… · requiredpriorityisEnabledUpdate an allocation rule › Responses
Success
id^alr_[A-Za-z0-9_-]{2… · requirednamepriorityfiltercostKindsegmentId^seg_[A-Za-z0-9_-]{2… · requiredisEnabledcreatedAtsegmentNamecostCentreupdatedAtDelete an allocation rule
Allocation is evaluated at query time, so removing a rule restates every past month immediately.
Needs a token with manageCostAllocation on the workspace.
path Parameters
ruleId^alr_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredHeaders
If-MatchApplies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.
Delete an allocation rule › Responses
No Content
Reorder the allocation rule set
Needs a token with manageCostAllocation on the workspace.
Reorder the allocation rule set › Request Body
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredruleIdsReorder the allocation rule set › Responses
Success
id^alr_[A-Za-z0-9_-]{2… · requirednamepriorityfiltercostKindsegmentId^seg_[A-Za-z0-9_-]{2… · requiredisEnabledcreatedAtsegmentNamecostCentreupdatedAtRead allocation coverage
Needs a token with viewCostAllocation on the workspace.
query Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredstartDateThe window's first day, included.
endDateThe window's last day, included, so March is 2026-03-01 to 2026-03-31. A window covers at most 366 days.
costBasisRead allocation coverage › Responses
Success
startDateendDatecostBasisList segments
Returns every segment cost can be assigned to in a workspace.
Needs a token with viewCostAllocation on the workspace.
query Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredpageThe page to return, counted from 1. A page below 1 reads page 1; one past the last returns no items.
limitItems per page, from 1 to 100. A larger value is clamped to 100, a smaller one to 1.
List segments › Responses
Success
Create a segment
Needs a token with manageCostAllocation on the workspace.
Headers
Idempotency-KeyA unique value, at most 255 printable ASCII characters, such as a UUID, that makes retrying this create safe. A retry with the same key and the same request within 24 hours answers the first response again, marked Idempotent-Replayed: true, and creates nothing; the same key with another request answers 422 idempotency_key_reused. A key is kept only for a create that succeeded. Without it, every request creates.
Create a segment › Request Body
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredteamLabelproductcostCentreisSharedlabelCreate a segment › Responses
Created
id^seg_[A-Za-z0-9_-]{2… · requiredteamLabelproductcostCentreisSharedlabelcreatedAtteamNameupdatedAtUpdate a segment
Renames a direct segment, or changes a shared segment's label and split.
Needs a token with manageCostAllocation on the workspace.
path Parameters
segmentId^seg_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredHeaders
If-MatchApplies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.
Update a segment › Request Body
teamLabelproductcostCentrelabelUpdate a segment › Responses
Success
id^seg_[A-Za-z0-9_-]{2… · requiredteamLabelproductcostCentreisSharedlabelcreatedAtteamNameupdatedAtDelete a segment
Refused with 409 in_use while any rule still assigns cost to it, any budget measures it, a shared segment's split names it, or a cost report, cost alert or saved filter filters to it.
Needs a token with manageCostAllocation on the workspace.
path Parameters
segmentId^seg_[A-Za-z0-9_-]{2… · requiredquery Parameters
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredHeaders
If-MatchApplies the write only while the resource still has this ETag, and answers 412 precondition_failed otherwise. Without it, the last write wins.
Delete a segment › Responses
No Content
Preview an allocation rule
Computes what the rule would move without creating it. Allocation is evaluated at query time, so enabling a rule restates history immediately.
Needs a token with viewCostAllocation on the workspace.
Preview an allocation rule › Request Body
workspaceId^wsp_[A-Za-z0-9_-]{2… · requiredstartDateendDatefiltersegmentId^seg_[A-Za-z0-9_-]{2… · requiredpriorityPreview an allocation rule › Responses
Success
billingCurrency^[A-Z]{3}$ · requiredmovedCost^-?[0-9]+(\.[0-9]{1,… · requiredmovedRecordCountcoverageBeforecoverageAfter