Skip to content

Get rule from policy

GET
/v1/policies/{policyId}/rules/{ruleId}
curl --request GET \
--url https://example.com/v1/policies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'X-API-Key: <X-API-Key>' \
--header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'
policyId
required
string format: uuid
ruleId
required
string format: uuid
X-Tenant-ID
required
string format: uuid

Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.

OK

Media type application/json

Single rule within a policy.

object
id
required
string format: uuid
ordinal
required

Evaluation order within the policy.

integer
effect
required
string
Allowed values: permit forbid
policy_text
required

Assembled Cedar text for this rule.

string
principal_scope_type
required
string
Allowed values: any eq in is is_in
principal_entity_type
string
nullable
principal_entity_id
string
nullable
action_scope_type
required
string
Allowed values: any eq in
action_ids
Array<string>
resource_scope_type
required
string
Allowed values: any eq in is is_in
resource_entity_type
string
nullable
resource_entity_id
string
nullable
conditions

Raw Cedar when/unless clause text.

string
nullable
notice

User-facing message for this rule.

string
nullable
audit_session

Whether grants should have session auditing.

boolean
created_at
required
string format: date-time
Example
{
"effect": "permit",
"principal_scope_type": "any",
"action_scope_type": "any",
"resource_scope_type": "any"
}

Unauthenticated

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Forbidden

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Not found

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}