API ReferenceManagementPolicy Rules Management
POST
/v1/mgmt/policies/rule/load

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

id?string

Load a single policy rule row by id.

curl -X POST "https://api.descope.com/v1/mgmt/policies/rule/load" \  -H "Content-Type: application/json" \  -d '{}'
{  "policyRule": {    "id": "string",    "version": "string",    "name": "string",    "description": "string",    "enabled": true,    "ruleFamily": "string",    "actionKinds": [      "string"    ],    "effect": "string",    "principalType": "string",    "principalSelector": [      "string"    ],    "resourceTargets": [      {        "type": "string",        "allOfType": true,        "ids": [          "string"        ]      }    ],    "grants": [      {        "scopes": [          "string"        ],        "allowedAudiences": [          "string"        ],        "allScopes": true      }    ],    "conditions": [      {        "key": "string",        "operator": "string",        "value": null      }    ],    "cedarText": "string",    "createdTime": 0,    "modifiedTime": 0  }}
export interface Response {policyRule?: {id?: stringversion?: stringname?: stringdescription?: stringenabled?: booleanruleFamily?: stringactionKinds?: string[]effect?: stringprincipalType?: stringprincipalSelector?: string[]resourceTargets?: RuleResourceTarget[]grants?: PolicyRuleGrant[]/** * Structured conditions (AND-ed). operator is one of: equal, notEqual, *  contains, notContains, in, notIn. value is a scalar (equal/contains) *  or a list (in/notIn), carried as a JSON value. */conditions?: PolicyRuleCondition[]cedarText?: string/** * int32 epoch seconds: proto3 emits int64 as JSON string. See .claude/rules/proto-files.md. */createdTime?: numbermodifiedTime?: number}}/** * RuleResourceTarget identifies a Resource subset for an PolicyRule. A *  target with AllOfType=true matches every resource of Type; otherwise the *  IDs list enumerates the specific resources. */export interface RuleResourceTarget {type?: stringallOfType?: booleanids?: string[]}export interface PolicyRuleGrant {scopes?: string[]allowedAudiences?: string[]allScopes?: boolean}export interface PolicyRuleCondition {key?: stringoperator?: string/** * Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. */value?: {[k: string]: unknown}}
Was this helpful?