Create Policy

Creates a new security, license, or operational risk policy (v2 API). The v2 API supports additional action fields compared to v1, including build_failure_grace_period_in_days, block_release_bundle_distribution, block_release_bundle_promotion, and create_ticket_enabled.

Requires the "Manage Policies" role to be set on the User or Group level.

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

When provided, the policy is created in the scope of the specified project. Requires Xray 3.21.2+ with Projects enabled.

Body Params
string
required

Name of the policy. Must be unique across the system (or within a project when using projectKey).

string

Optional free-text description of the policy.

string
enum
required

The policy type. Determines which criteria fields are available in the rules.

Allowed:
rules
array of objects
required

One or more rules that define the policy behavior. Each rule specifies criteria to match and actions to take when matched.

rules*
Responses

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