Policies

Create a policy.

Changed on

Creates a policy from the request body under the given name. A name the owner already uses is refused with 409; replace an existing policy with PUT /api/policies/{policyName}. The policy is validated before it is stored. 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. Admins may create a policy in another user's account by passing that user's username as owner. Requires the policies:write scope.

post/api/policies

Request

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

Query parameters

namestring required
ownerstring
detailsboolean

Headers

Authorizationstring required

Request body

object required

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

Response

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

Changes