Change a policy
PATCH/v1/policies/:id
A block the request does not mention is kept. An optional block is removed with its clear_ flag. Changes apply to the backups taken from now on. With apply_to_existing, the existing backups that are not locked are re-dated too, and applied says how many changed. Moving an expiry earlier needs the policy:shorten permission.
Operator only: needs a system-scoped token.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 422
- default
OK
Bad Request.
invalid_request: The body is not a single JSON object, names a field this operation does not take, or gives a value of the wrong type.
Unauthorized.
unauthenticated: The token is missing, expired or not valid.
Forbidden.
forbidden: The token lacks the policy:write permission. Or assigned_to is given and the token lacks policy:assign. Or apply_to_existing would move an existing backup's expiry earlier and the token lacks policy:shorten.
Not Found.
not_found: The id is not a UUID, or no policy has it.
Conflict.
conflict: Another policy already has the new name.
Request Entity Too Large.
body_too_large: The body is larger than the service accepts.
Unsupported Media Type.
unsupported_media_type: The body is not sent as application/json.
Unprocessable Entity.
validation_failed: A field is not acceptable, and fields names each one. name is empty. visibility has another value. A clear_ flag is sent with the block it clears. The changed terms fail a check made on creation.
An error, as an RFC 7807 problem document.