Update Policy State.
Notice
Accessing the Policy Management APIs is through a dedicated domain/URL, according to your PlainID Tenant Locationhttps://api.us1.plainid.iohttps://api.ca1.plainid.iohttps://api.eu1.plainid.ioUsing HTML Encoded Special Characters
Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.
cURL Sample Guidelines
In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right in the Try It or Code Sample tabs. You can then copy the cURL sample from the Code Sample tab in the correct format.
For more details about Administration API Authentication, check out the Authentication APIs documentation
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
The Environment ID can be found under the Details Tab in the Environment Settings.
The Policies Workspace ID can be found in the Workspace Settings.
Policy ID Filter
[
{
"op": "replace",
"path": "/state",
"value": true
}
][
{
"op": "replace",
"path": "/policyId",
"value": "new_policy_id"
}
]Success - No Content
bad request
{
"errors": [
{
"code": "PAC-001",
"args": {
"0": "ceef5853-1491-4d1c-ae52-2f2a1729b3a4"
},
"id": "EWWOTR",
"status": 400,
"name": "AuthorizationWsNotFound",
"message": "Policies Workspace: [ceef5853-1491-4d1c-ae52-2f2a1729b3a4] not found"
}
]
}{
"errors": [
{
"code": "PA-072",
"id": "E9F3KD",
"status": 400,
"name": "BadRequestError",
"message": "Could not locate patch path"
}
]
}{
"errors": [
{
"id": "EPMQJV",
"status": 400,
"name": "DuplicateJsonFieldError",
"message": "Duplicate field in request body: 'value'"
}
]
}Unauthorized
not found
{
"errors": [
{
"code": "PUA-033",
"args": {
"0": "a0a455bb-7dc3-4cd3-b0d2-86631ac75379",
"1": "ceef5853-1491-4d1c-ae52-2f2a1729b3a4"
},
"id": "E7WJBB",
"status": 404,
"name": "PolicyNotFoundError",
"message": "Policy Id doesn't exist in the environment"
}
]
}Validation Failed - Invalid UUID or invalid /policyId value
{
"errors": [
{
"code": "V-032",
"args": {
"0": "ed252aa5-9d0c-4193-838-60bf20b13109",
"1": "uuid"
},
"id": "EEJQMA",
"status": 422,
"name": "UnprocessableEntityError",
"message": "$: test is an invalid uuid"
}
]
}{
"errors": [
{
"code": "V-023",
"id": "E4K7QZ",
"status": 422,
"name": "UnprocessableEntityError",
"message": "Invalid policy ID. Acceptable characters: letters (a-z, A-Z), digits (0-9), hyphens ('-'), underscores ('_'), colons (':'), and periods ('.')."
}
]
}