Skip to main content

Get Principal Policy

Request

Retrieves a principal policy in a project by user principal. Access to this operation is controlled at the project level. Returns nil if the policy is disabled.

The auth token's access policy must allow action:use/getPrincipalPolicy.

Security
bearerAuth
Path
projectIdstring(ProjectId)^project:[0-9a-zA-Z](?![^:]*-$)(?![^:]*--)[0-...required

Globally unique identifier of a project. Callers may URL encode this value.

Example:project:abc-123
userPrincipalstring(Principal)^principal:([0-9a-zA-Z](?![^:]*-$)(?![^:]*--)...required

Globally unique string identifier for a principal formatted like "principal:...". Callers may URL encode this value.

Example:principal:abc-123:idp:example-user
Payload
// No request payload

Responses

Success

Bodyapplication/json
descriptionstring^.{0,500}$
Example:"A description string."
tagsobject, <= 10 properties(Tags)required

Additional user-controlled data about this resource.

updatedAtstring(UpdatedAt)^.*$

A string timestamp indicating when the resource was last updated. Formatted like: "2025-02-12T17:24:19.033772087Z"

Example:"2024-01-15T12:00:00Z"
userPrincipalstring(Principal)^principal:([0-9a-zA-Z](?![^:]*-$)(?![^:]*--)...required

Globally unique string identifier for a principal formatted like "principal:...".

Example:"principal:abc-123:idp:example-user"
permissionsArray of objects, unique(ManagedPermissionSetRef)required
createdBystring(CreatedBy)^.*$

A string indicating the principal who invoked an operation to create the resource.

Example:"principal:ABCD-EFG-12345:idp:example-user"
createdAtstring(CreatedAt)^.*$

A string timestamp indicating when the resource was created. Formatted like: "2025-02-12T17:24:19.033772087Z"

Example:"2024-01-15T12:00:00Z"
revstring(ResourceRev)^.*$required

An opaque string that represents the revision of a given resource. Each time the resource is updated, this value changes.

Example:"abc123"
approvedAtstring(UpdatedAt)^.*$

A string timestamp indicating when the resource was last updated. Formatted like: "2025-02-12T17:24:19.033772087Z"

Example:"2024-01-15T12:00:00Z"
disabledPolicyany
Value:true
Example:true
updatedBystring(UpdatedBy)^.*$

A string indicating the principal who last invoked an operation to update the resource.

Example:"principal:ABCD-EFG-12345:idp:example-user"
approvedBystring(ApprovedBy)^.*$

A string indicating the principal who invoked an operation to approve the resource.

Example:"principal:ABCD-EFG-12345:idp:example-user"
Response
{ "description": "A description string.", "tags": { "property1": "my tag value", "property2": "my tag value" }, "updatedAt": "2024-01-15T12:00:00Z", "userPrincipal": "principal:abc-123:idp:example-user", "permissions": [ { … } ], "createdBy": "principal:ABCD-EFG-12345:idp:example-user", "createdAt": "2024-01-15T12:00:00Z", "rev": "abc123", "approvedAt": "2024-01-15T12:00:00Z", "disabledPolicy": true, "updatedBy": "principal:ABCD-EFG-12345:idp:example-user", "approvedBy": "principal:ABCD-EFG-12345:idp:example-user" }
Was this page helpful?