Skip to navigation

Create Policy

Creates a new policy.

A policy binds one or more roles to a set of resources, granting members who hold those roles the actions defined by them. Roles must already exist before they are referenced in a policy; create roles using POST /api/permissions/roles.

Authentication

AuthorizationBasic

This is the Polytomic deployment key (on-premises only)

OR
AuthorizationBearer
This is the Polytomic API key

Headers

X-Polytomic-VersionstringRequired

Request

This endpoint expects an object.
namestringRequired
policy_actionslist of objects or nullRequired
organization_idstring or nullOptionalformat: "uuid"

Ignored for user and organization-scoped API keys, which always act in their own organization

Response

OK
dataobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error