Data access grants
Limit what a member or API key can see in a workspace to the records that carry some values of a scoping attribute.
A data access grant restricts one member or one API key, inside one workspace, to records whose scoping attribute holds one of the allowed values. Use it when people or integrations should see only their own slice: one customer’s tickets, one team’s agents, one region’s orders.
Organisation owners and admins are never limited. A member or key with no grants sees every record. With grants, it sees only the allowed records, on every activity read, timeline, catalog, view, series, analytics, summary, health and incidents read, in traces and in MCP tools.
Before you start: declare a scope
Grants work on an attribute declared with scope: true in the workspace’s
data dictionary, usually a ref such as a company or team:
{ "key": "team", "label": "Team", "type": "ref", "entity": "team", "scope": true }Add it in Workspace → Data or with an attribute.add or
attribute.update draft op, then activate. For a
ref scope, a grant also allows the referenced entity itself: granting team
t_7 shows records with team: t_7 and the team entity t_7.
Limit access in the dashboard
- Open Settings → Data access. If there is more than one workspace, pick it under Workspace.
- Choose Limit access.
- Under Who, pick a member or an API key. Owners and admins are not listed because they always see everything.
- Under Scope, pick the scoping attribute.
- Under Allowed values, pick values seen in this workspace, or type one and press Enter.
- Choose Add grant.
The page lists every grant in the workspace with the member or key, the scope and its values. Use the pencil to change the allowed values, or the bin to remove a grant. Removing someone’s last grant in the workspace shows Remove and lift limit: afterwards they see every record again.
The page shows Nothing to scope by when the workspace declares no scope attribute, and Everyone sees everything when there are no grants yet.
Manage grants through the API
All four operations need an owner or admin session, or an API key with
workspaces:manage. A credential that is itself scoped by a grant cannot
manage grants.
| Action | Operation |
|---|---|
| List a workspace’s grants | GET /workspaces/{workspaceId}/access-grants |
| Create or replace a grant | POST /workspaces/{workspaceId}/access-grants |
| Replace a grant’s values | PATCH /workspaces/{workspaceId}/access-grants/{grantId} |
| Remove a grant | DELETE /workspaces/{workspaceId}/access-grants/{grantId} |
curl -X POST "https://api.axonpush.xyz/workspaces/$WORKSPACE_ID/access-grants" \
-H "X-API-Key: $AXONPUSH_MANAGE_KEY" \
-H "Content-Type: application/json" \
-d '{
"principalType": "apikey",
"principalId": "key_...",
"key": "team",
"values": ["t_7", "t_9"]
}'| Field | Rules |
|---|---|
principalType | user (a member) or apikey |
principalId | The member’s user id or the API key id, in this organisation |
key | An attribute declared with scope: true |
values | 1 to 100 opaque references. Values that look like credentials are refused |
There is one grant per workspace, principal and key. Posting again for the same
three replaces the allowed values. The response is the grant with its id,
createdBy, createdAt and updatedAt. Creating, updating and deleting
grants are recorded in the audit log.
The same operations are MCP tools: workspaces_listAccessGrants,
workspaces_createAccessGrant, workspaces_updateAccessGrant and
workspaces_deleteAccessGrant.
How a scoped principal is limited
- Across the organisation. A member or key with a grant in any workspace is
scoped everywhere. A workspace where it has no grant shows it nothing, and
GET /workspaceslists only workspaces where it has a grant. - Organisation-wide reads are refused. Operations that read
organisation-wide telemetry (such as raw events, organisation analytics,
errors, exports and the audit trail) answer
403for a scoped credential.GET /capabilitieslists them undercontrols.dataAccess.refusedForScoped. - Traces. A scoped principal sees only traces referenced by observations its grants allow.
- Several grants in one workspace allow a record that matches any of them.
A grant narrows what a principal can read. It does not give a member or key any permission it did not already have through its role or scopes.