---
title: "Query RoleGrants"
method: GET
path: "/roleGrants"
tags: ["RoleGrant"]
---

# Query RoleGrants

`GET /roleGrants`

Used to query RoleGrants

## Query parameters

- `parent_namespace` 'workspaces', required — Namespace of the parent to which this RoleGrant belongs
- `parent_id` string, required
- `principal_namespace` 'users' — Namespace of the principal to which this RoleGrant applies
- `principal_id` string

## Response `200`

Results of the query

- RoleGrantQueryResult
  - `role_grants` RoleGrant[] — All RoleGrants that matched the query
    - `id` string — Unique ID of the RoleGrant
    - `parent_namespace` 'workspaces' — Namespace of the parent to which this RoleGrant belongs
    - `parent_id` string — Id of the Parent to which this RoleGrant belongs
    - `role_id` string — ID of the Role associated with this RoleGrant
    - `managed_role` boolean — Specifies if this is a ManagedRole. ManagedRoles are controlled by mabl and statically defined in code. Only CustomRoles are persisted.
    - `principal_id` string — ID of the Principal for which this RoleGrant applies
    - `principal_namespace` 'users' — Namespace of the principal to which this RoleGrant applies
    - `scope` 'global' | 'companies' | 'workspaces' | 'resource_groups' | 'credentials' | 'datatables' — Scope of the Resource for which this RoleGrant applies
    - `target` string — ID of the Resource for which this RoleGrant applies
    - `created_time` integer — Time at which the RoleGrant was created
    - `created_by_id` string — The ID of the user who created this RoleGrant
    - `acknowledged_status` 'requires_acknowledgement' | 'acknowledged' — LEGACY PROPERTY. Status marking whether the user has acknowledged the welcome message in the joined workspace.

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
