Site access API
Grant workspace-site roles Data Vault collections, workspace-wide Files, and Apps launch.
Site access is how your app users' roles (from workspace sign-in) get Data Vault collections, Files and Apps. It doesn't affect your team's roles or M2M clients.
See also: Access
The built-in admin role is a role like any other: it reaches a collection, Files or an app only through a grant, and its grants show up here. New collections and new workspaces start with an admin grant, which you can remove.
Only your team can call these routes. An app user's token gets 403.
Get Access
GET /v1/workspaces/{workspace_id}/accessPermission: read
{
"workspace_id": "<uuid>",
"roles": [
{ "name": "viewer", "builtin": true },
{ "name": "user", "builtin": true },
{ "name": "admin", "builtin": true }
],
"apps": [
{ "id": "<app uuid>", "name": "Billing", "visibility": "restricted" }
],
"vault_grants": [
{ "role": "admin", "collection": "orders", "action": "delete" },
{ "role": "user", "collection": "orders", "action": "write" }
],
"files_grants": [
{ "role": "admin", "action": "write" },
{ "role": "user", "action": "read" }
],
"app_grants": [
{ "role": "admin", "app_id": "<app uuid>", "action": "read" },
{ "role": "user", "app_id": "<app uuid>", "action": "read" }
]
}| Field | Meaning |
|---|---|
vault_grants | Per collection. action is read | write | delete |
files_grants | Workspace-wide (every file). action is read | write |
app_grants | Launch on the Shell. action is always read |
apps[].visibility | workspace if every site role, admin included, can launch; otherwise restricted |
If Groundfloor login is not enabled, roles falls back to builtin viewer / user / admin.
Replace Access
PUT /v1/workspaces/{workspace_id}/accessPermission: ddl
Body is a full replace of the grant lists you send. Grants are saved exactly as sent, admin included: if you leave admin out, its grant is removed and admins lose that access. Start from GET and change only what you mean to.
{
"vault_grants": [
{ "role": "admin", "collection": "orders", "action": "delete" },
{ "role": "user", "collection": "orders", "action": "write" }
],
"files_grants": [
{ "role": "admin", "action": "write" },
{ "role": "user", "action": "read" }
],
"app_grants": [
{ "role": "user", "app_id": "<app uuid>", "action": "read" }
]
}| Field | If omitted |
|---|---|
vault_grants | Treated as [] — every collection loses all its role grants, admin included |
files_grants | Treated as [] — no role, admin included, can use Files |
app_grants | null / omitted — leave Apps unchanged. Send [] to restrict every product app |
Vault PUT preserves workload-identity grants on each collection.
If every role in roles, admin included, has launch on an app, visibility is workspace. Leaving out any role, admin too, makes it restricted to the roles you listed.
Collection shortcut
Per-table Vault grants also exist on the Data Vault API:
GET /v1/workspaces/{workspace_id}/vault/collections/{name}/acl
PUT /v1/workspaces/{workspace_id}/vault/collections/{name}/aclPermission: read / ddl
See Data Vault API — Collection Access.