Skip to main content

GET /v1beta1/policies

Retrieve a list of policies based on various filter criteria including organization, project, user, role, or group.

Query Parameters

org_id
string
Filter policies by organization ID or name. Accepts both UUID and organization name.
project_id
string
Filter policies by project ID or name. Accepts both UUID and project name.
user_id
string
Filter policies by user ID or email. Accepts both UUID and user identifier.
role_id
string
Filter policies by role ID or name. Accepts both UUID and role name.
group_id
string
Filter policies by group ID. Must be a valid UUID.

Response

policies
array
List of policy objects matching the filter criteria.
id
string
Unique identifier for the policy.
role_id
string
ID of the role assigned by this policy.
resource
string
Resource identifier in the format namespace:resource_id (e.g., app/organization:123, app/project:456).
principal
string
Principal identifier in the format namespace:principal_id (e.g., app/user:789, app/group:012).
metadata
object
Additional metadata associated with the policy.
created_at
timestamp
Timestamp when the policy was created.
updated_at
timestamp
Timestamp when the policy was last updated.
curl -X GET 'https://api.frontier.example.com/v1beta1/policies?org_id=my-org&role_id=admin' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Response Example

{
  "policies": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "role_id": "admin-role-id",
      "resource": "app/organization:org-123",
      "principal": "app/user:user-456",
      "metadata": {
        "description": "Admin access to organization"
      },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    },
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "role_id": "viewer-role-id",
      "resource": "app/project:proj-789",
      "principal": "app/group:group-012",
      "metadata": {},
      "created_at": "2024-01-20T14:20:00Z",
      "updated_at": "2024-01-20T14:20:00Z"
    }
  ]
}

Error Responses

error
object
code
string
Error code. Possible values:
  • invalid_argument - Invalid filter parameters
  • internal - Internal server error
message
string
Human-readable error message.

Notes

  • Filter parameters can accept both UUIDs and human-readable names (except for group_id which requires a UUID)
  • Multiple filters can be combined to narrow down results
  • All query parameters are optional
  • Returns an empty array if no policies match the filter criteria

Build docs developers (and LLMs) love