Create a policy in the given namespace

Creates a policy within the specified namespace.

A policy defines a set of rules governing actions on specified resources under predefined conditions.
In Apache Polaris, policies are created, stored, and later referenced by external engines to enforce access controls on associated resources.

User provides the following inputs when creating a policy

  • name (REQUIRED): The name of the policy.
  • type (REQUIRED): The type of the policy.
    • Predefined Policies: policies have a system.* prefix in their type, such as system.data_compaction
  • description (OPTIONAL): Provides details about the policy's purpose and functionality
  • content (OPTIONAL): Defines the rules that control actions and access conditions on resources. The format can be JSON, SQL, or any other format.

The content field in the request body is validated using the policy's corresponding validator. The policy is created only if the content passes validation.

Upon successful creation, the new policy's version will be 0.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

An optional prefix in the path

string
required

A namespace identifier as a single string. Multipart namespace parts should be separated by the unit separator (0x1F) byte.

Body Params
string
required
^[A-Za-z0-9\-_]+$

A policy name. A valid policy name should only consist of uppercase and lowercase letters (A-Z, a-z), digits (0-9), hyphens (-), underscores (_).

string
required
string
string
Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json