usage-policies-admin

Put a policy in force for one organization, charging it for the activity before it.

Platform admin only. A policy is immutable, so this only ever activates a new one: when a policy already governs the same template and scope, the response is a conflict naming it, and changing that budget means retiring it first.

The new policy is charged for the organization's prior activity as part of the same act, so it can be created already partly — or wholly — spent, and the response says by how much. A charge that cannot be computed refuses the whole call and creates nothing, because a policy blind to its history under-reports and under-enforces with nothing on the surface to show it.

post/admin/organizations/{organization_id}/usage-policies

Request

  • Base URL
    https://api.traversal.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.traversal.com/admin/organizations/{organization_id}/usage-policies
  • Auth
    none declared

Path parameters

organization_idstring uuid required

Request body

policy_template_idstring uuid required

The template whose limit behaviour this policy applies.

scope'user' | 'organization' | 'automation' | 'worker' required

Whose consumption a policy counts.

AUTOMATION counts the whole organization exactly as ORGANIZATION does and differs only in which activity it accepts: human and automated work draw on separate budgets, so each of those two scopes counts one of them and refuses the other.

budgetinteger nullable

Credits the scope may consume per window. Null imposes no limit, which is distinct from 0 forbidding all usage.

Response

Successful Response

Changes

    • warning

      added the new worker enum value to the / response property for the response status

    • info

      added the new worker enum value to the request property

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status