What the tenant's setup still needs: a connection, notice recipients, and each unfinished connection's steps.
const url = 'https://api.contentsurface.io/v1/admin/setup';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.contentsurface.io/v1/admin/setup \ --header 'Authorization: Bearer <token>'The tenant’s setup checklist: whether a connection exists, whether an admin receives the notice e-mails, and the steps of every connection whose setup is not complete. Every step is read from current state — a connection’s consent, key or agents, its last check and scans, its mount points and mount folders and their access — so a step done elsewhere, through the API or the Portal, is done here too, and a step that fails shows as attention. Reads only. Tenant admins and repository admins.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
The tenant’s setup checklist.
object
True when every tenant step is done and every connection’s setup is complete.
The tenant’s own steps: connection, noticeRecipients.
One step of a setup checklist.
object
The step. Tenant: connection (a connection exists), noticeRecipients (an admin receives the notice e-mails).
Connection, in order, each only where it applies: consent (Microsoft 365: an administrator granted the admin consent),
binding (Google Drive: a super admin of the Workspace bound its domain by signing in with Google), agent (on-premises: an enrolled agent is linked and online),
check (the source accepted the connection: the last check passed, or a scan succeeded since), documentTypes
(Salesforce and databases: a document type is defined), mountPoint, mountFolder, activate (a mount folder is
activated), scan (every activated mount folder has finished its first scan and its location is found) and access
(every activated mount folder’s access grants at least one label).
done, todo (still to do) or attention (failing: something needs fixing, such as a withdrawn consent or a failed check).
Why, for attention and a failed check: the error code of the refusal or the failed check, such as
source.delegation_missing; agent.offline for agent; for scan, the location’s health — notFound, accessDenied
or empty. Null otherwise.
How many: for activate, mount folders still in draft; for scan, activated mount folders not yet scanned, or with
attention those whose location is not found; for access, activated mount folders whose access grants no label.
Null for other steps.
Connections whose setup is not complete, by name, at most 10.
A connection’s setup checklist.
object
The connection (cnx_…).
Its name.
Its connector type.
True when every step is done.
Its steps, in the order they are done.
One step of a setup checklist.
object
The step. Tenant: connection (a connection exists), noticeRecipients (an admin receives the notice e-mails).
Connection, in order, each only where it applies: consent (Microsoft 365: an administrator granted the admin consent),
binding (Google Drive: a super admin of the Workspace bound its domain by signing in with Google), agent (on-premises: an enrolled agent is linked and online),
check (the source accepted the connection: the last check passed, or a scan succeeded since), documentTypes
(Salesforce and databases: a document type is defined), mountPoint, mountFolder, activate (a mount folder is
activated), scan (every activated mount folder has finished its first scan and its location is found) and access
(every activated mount folder’s access grants at least one label).
done, todo (still to do) or attention (failing: something needs fixing, such as a withdrawn consent or a failed check).
Why, for attention and a failed check: the error code of the refusal or the failed check, such as
source.delegation_missing; agent.offline for agent; for scan, the location’s health — notFound, accessDenied
or empty. Null otherwise.
How many: for activate, mount folders still in draft; for scan, activated mount folders not yet scanned, or with
attention those whose location is not found; for access, activated mount folders whose access grants no label.
Null for other steps.
How many connections’ setup is not complete.
Example
{ "complete": false, "steps": [ { "key": "connection", "state": "done", "code": null, "count": null }, { "key": "noticeRecipients", "state": "done", "code": null, "count": null } ], "connections": [ { "connectionId": "cnx_01j9n4wzr0e008000000000003", "name": "Google Drive", "connectorType": "google-drive", "complete": false, "steps": [ { "key": "binding", "state": "done", "code": null, "count": null }, { "key": "check", "state": "attention", "code": "source.delegation_missing", "count": null }, { "key": "mountPoint", "state": "done", "code": null, "count": null }, { "key": "mountFolder", "state": "done", "code": null, "count": null }, { "key": "activate", "state": "done", "code": null, "count": 0 }, { "key": "scan", "state": "todo", "code": null, "count": 1 }, { "key": "access", "state": "todo", "code": null, "count": 1 } ] } ], "incompleteConnections": 1}No valid access token, or it no longer holds for the user (suspended, signed out, relation removed).
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
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.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
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: tenantAdmin, repositoryAdmin.", "code": "role-required"}Absent: not existing, in another tenant, or not readable by the caller — never distinguished.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
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.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
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}