Delete a policy
DELETE/v1/directory/policies/{policy_id}
Deletes a policy, and takes it out of every role that holds it.
Permission: identity:DeletePolicy. Changes need a sign-in that used a second factor.
Path parameters
| Parameter | Type | Description |
|---|---|---|
policy_id |
string | The policy's ID. |
Returns
204 No Content, with no body.
Errors
Besides the errors every call can return:
| Status | When |
|---|---|
404 |
No such resource in your organization. |
409 |
The policy is managed, or it would leave your organization with no administrator. |
Example
curl -X DELETE https://<company>.yotta.bot/v1/directory/policies/7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a \
-H "Authorization: Bearer $YOTTABOT_TOKEN"With yottactl
yottactl org policies delete 7d8e9f0a-1b2c-4d3e-8f4a-5b6c7d8e9f0a