Policy State
  • 12 Dec 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Policy State

  • Dark
    Light
  • PDF

Article Summary

Patch
/api/1.0/policies/{envId}/{policyId}

Active Policies are factored into the authorization decision returned by the Authorization Platform. Similarly, an Inactive Policy is not considered when calculating the authorization decision. The setting for Policy State is per Environment.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL according to your PlainID Tenant Location:
https://api.{REGION}.plainid.io

United States (US) - https://api.us1.plainid.io
Canada (US) - https://api.ca1.plainid.io
Europe (US) - https://api.eu1.plainid.io

Replace{REGION} with your PlainID Tenant region (e.g. us1, eu1, ca1, etc.).


Security
Http
Type bearer
For more details about Management API Authentication, check out the Management APIs Authentication Article
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: `Authorization: Bearer 123`
Path parameters
envId
stringRequired

The Environment that the Policy is located in.
The Environment ID can be found under the Details tab in the Environment Settings.

policyId
stringRequired

The Policy ID can be found on the Policy Details tab

Body parameters
Switch Policy State
[
  {
    "op": "replace",
    "path": "/state",
    "value": true
  }
]
Array of object
object
op
string Required
Valid values[ "replace" ]
path
string Required
Valid values[ "/state" ]
value
boolean Required
Responses
204

Success - No Content

400

Bad Request

Headers
x-request-id
string
Expand All
object
errors
Array of object
object
code
string
args
object
0
string
1
string
id
string
status
integer
name
string
message
string
401

Unauthorized

Headers
x-request-id
string
Expand All
object
errors
Array of object
object
code
string
args
object
0
string
1
string
id
string
status
integer
name
string
message
string
404

Policy Not Found

Headers
x-request-id
string
Expand All
object
errors
Array of object
object
code
string
args
object
0
string
1
string
id
string
status
integer
name
string
message
string

Was this article helpful?

What's Next