Update Policy

PUT /v2/policies/{policyId}

Required Permissions

NameConditions

Policies:Update

Always Required

Body

Same as Create Policy body.

Responses

200 - no approval required

Same as Create Policy response.

202 - approval required

In the case when an approval is first required before the policy can actually be modified, a 202 status code is returned, and the object returned is a "Policy change request", which contains an approvalId. You can use the approvalId to fetch the right approval to be fulfilled before this change request actually executes.

// policy change request object
{
  "id": "cr-...",
  "kind": "Policy",
  "operationKind": "Update",
  "status": "Pending",
  "requester": { "userId": "us-..." },
  "entityId": "plc-...",
  "approvalId": "ap-...",
  "dateCreated": "2023-12-22T20:57:55.814Z",
  "body": {
    ... // the full body passed in the request
  }
}

Last updated