Policies

Replace a policy.

Changed on

Replaces an existing policy with the request body, as a new revision. The policy is validated before it is stored. Its description and notes are kept unless the body gives them. To set the description and notes in the same write, pass details=true and send {"policy": <the policy>, "description": "...", "notes": "..."}; description and notes are optional, a field left out or null is left as it is, and an empty value clears it. Without details=true the body is the policy itself. Send the ETag from your read in If-Match to make the write conditional: if the policy, its description, or its notes changed since, nothing is written and the response is 409 with reason policy_changed. Without If-Match the write is not checked against an earlier read. Admins may replace another user's policy by passing that user's username as owner. Requires the policies:write scope.

put/api/policies/{policyName}

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/policies/{policyName}
  • Auth
    HTTP bearer

Path parameters

policyNamestring required

Query parameters

ownerstring
detailsboolean

Headers

Authorizationstring required
If-Matchstring

Request body

object required

Native Phileas policy. identifiers is required; custom dictionaries use dictionaries.

Response

The policy was replaced and is now active. The ETag header identifies it as written. A policy_activated audit event is recorded.

Changes

    • info

      added the new optional header request parameter If-Match

    • info

      added the new optional query request parameter details

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status