scoped-budgets

Create Scoped Budget

Create a scoped budget.

Answers 404 when the scope names nothing, rather than creating a ceiling that can never bind.

post/v1/scoped-budgets

Request body

budget_idstring required

The budget this ceiling enforces; its limit and period are read through it

namestring nullable

Admin-facing label for this ceiling

provider_key_idstring nullable

Narrow the cap to one provider instance; null caps spend across every provider

scope_idstring required

Id of the capped identity: an organization, workspace, membership row, or API key

scope_type'organization' | 'workspace' | 'workspace_member' | 'org_member' | 'api_token' required

Which kind of identity this ceiling caps

Response

Successful Response

budget_duration_secinteger nullable required
budget_idstring required
created_atstring required
current_spendnumber required
idstring required
max_budgetnumber nullable required
namestring nullable required
period_endstring nullable required
period_startstring nullable required
provider_key_idstring nullable required
reserved_spendnumber required
reset_alignmentstring nullable required
scope_idstring required
scope_typestring required
updated_atstring required

Changes

Changed in 5 of the 126 revisions of this API.378

  • e0dee1efa501131See the full diff
    • added the new required request property budget_id

      new-required-request-property

    • removed the request property budget_duration_sec

      request-property-removed

    • removed the request property max_budget

      request-property-removed

    • removed the request property reset_alignment

      request-property-removed

    • added the required property budget_id to the response with the 200 status

      response-required-property-added

  • 2f89238cc674113See the full diff
    • removed the required property budget_id from the response with the 200 status

      response-required-property-removed

    • removed the request property budget_id

      request-property-removed

    • added the new optional request property budget_duration_sec

      new-optional-request-property

    • added the new optional request property max_budget

      new-optional-request-property

    • added the new optional request property reset_alignment

      new-optional-request-property

    This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 875cef5dd6a8131See the full diff
    • added the new required request property budget_id

      new-required-request-property

    • removed the request property budget_duration_sec

      request-property-removed

    • removed the request property max_budget

      request-property-removed

    • removed the request property reset_alignment

      request-property-removed

    • added the required property budget_id to the response with the 200 status

      response-required-property-added

    • added the new optional request property reset_alignment

      new-optional-request-property

    • added the required property reset_alignment to the response with the 200 status

      response-required-property-added

    • endpoint added

      endpoint-added