Create a policy.
Changed onCreates 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.
Request
- Base URL/ (relative, and the document was published on a file host, not at the API’s origin)
- URL/api/policies
- AuthHTTP bearer
Query parameters
Headers
Request body
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
- breaking
removed the media type
*/*for the response with the status
- breaking
- info
added the new optional
queryrequest parameterdetails
- info