Skip to content

The why-endpoint: for a user and a node, the deciding node, matching labels, how the user holds them, and the inheritance chain.

GET
/v1/admin/access/explain
curl --request GET \
--url 'https://api.contentsurface.io/v1/admin/access/explain?userId=usr_01j9n4w7r0e008000000000002&nodeId=nod_01j9n4wqr0e008000000000001' \
--header 'Authorization: Bearer <token>'

Explains why a user can or cannot read a node: the access list that decides, the folders it is inherited through, and which of the user’s labels it grants — directly or through which group. A suspended or invited user reads nothing. Repository admins.

userId
string

The user (usr_…); required.

Example

usr_01j9n4w7r0e008000000000002
nodeId
string

The node (nod_…); required.

Example

nod_01j9n4wqr0e008000000000001

OK

Media typeapplication/json

Why a user can or cannot read a node.

object
userId
required

The user (usr_…).

string
nodeId
required

The node (nod_…).

string
canRead
required

True when the user may read the node in the Portal.

boolean
decidingNodeId
required

The node whose access decides: the node’s own override or the nearest one above (nod_…).

string
inheritanceChain
required

The folders from the root to the node, marking those with overrides.

Array<object>

One folder on the way from the root to a node.

object
nodeId
required

The folder (nod_…).

string
name
required

The folder’s name; / for the root folder.

string
hasOverride
required

True when the folder has its own access override.

boolean
matchingGrants
required

The user’s labels the deciding access grants, and how the user holds each; empty when none does.

Array<object>

A label of the user’s that the deciding access list grants.

object
labelId
required

The label (alb_…).

string
labelName
required

The label’s name.

string
rights
required

What it grants: read.

Array<string>
holdings
required

Every way the user holds the label.

Array<object>

How a user holds a label.

object
directly
required

True when the user holds the label themselves.

boolean
viaGroupId
required

The group through which the user holds it (grp_…); null when held directly.

null | string
viaGroupName
required

That group’s name.

null | string
repositoryAdminIsTheOnlyReason
required

True when the user reads the node only because they are a repository admin — not through an application without admin access, nor for a client acting for them.

boolean
impersonationIgnoresRoles
required

Always true: a client acting for the user reads with the labels only, never the user’s roles.

boolean

Example

{
"userId": "usr_01j9n4w7r0e008000000000002",
"nodeId": "nod_01j9n4wqr0e008000000000004",
"canRead": true,
"decidingNodeId": "nod_01j9n4wqr0e008000000000001",
"inheritanceChain": [
{
"nodeId": "nod_01m3axs700e008000000000004",
"name": "/",
"hasOverride": true
},
{
"nodeId": "nod_01j9n4wqr0e008000000000001",
"name": "Finance",
"hasOverride": true
},
{
"nodeId": "nod_01j9n4wqr0e008000000000002",
"name": "Finance share",
"hasOverride": false
},
{
"nodeId": "nod_01j9n4wqr0e008000000000003",
"name": "Invoices 2026",
"hasOverride": false
},
{
"nodeId": "nod_01j9n4wqr0e008000000000004",
"name": "March invoices.pdf",
"hasOverride": false
}
],
"matchingGrants": [
{
"labelId": "alb_01j9n4wfr0e008000000000001",
"labelName": "Finance",
"rights": [
"read"
],
"holdings": [
{
"directly": false,
"viaGroupId": "grp_01j9n4wbr0e008000000000001",
"viaGroupName": "Finance"
}
]
}
],
"repositoryAdminIsTheOnlyReason": false,
"impersonationIgnoresRoles": true
}

The request is not valid: a malformed ID, body, filter or parameter.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:validation-failed",
"title": "The request is not valid.",
"status": 400,
"detail": "'userId' must be an ID of the form usr_… .",
"code": "validation-failed",
"field": "userId"
}

No valid access token, or it no longer holds for the user (suspended, signed out, relation removed).

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:unauthorized",
"title": "Not authenticated.",
"status": 401,
"detail": "A valid access token is required.",
"code": "unauthorized"
}

Authenticated but not allowed: a missing scope or role, an impersonated token on an admin endpoint, or an inactive tenant.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:role-required",
"title": "Not allowed.",
"status": 403,
"detail": "This endpoint requires one of the roles: repositoryAdmin.",
"code": "role-required"
}

Absent: not existing, in another tenant, or not readable by the caller — never distinguished.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:not-found",
"title": "Not found.",
"status": 404,
"detail": "The resource does not exist.",
"code": "not-found"
}

Load protection: the tenant is making too many calls, or running too many searches or content streams, at once. Transient and never a quota; retry after Retry-After seconds.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:too-many-requests",
"title": "Too many requests.",
"status": 429,
"detail": "The tenant is making more API calls than one replica serves at once; retry shortly.",
"code": "too-many-requests",
"retryAfter": 1
}