A connection's setup checklist, each step read from its current state.
const url = 'https://api.contentsurface.io/v1/admin/connections/cnx_01j9n4wzr0e008000000000001/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/connections/cnx_01j9n4wzr0e008000000000001/setup \ --header 'Authorization: Bearer <token>'A connection’s setup checklist, in the order the steps are done: the consent, key or agent its connector needs, a passing check, document types where the connector needs them, a mount point, a mount folder, activation, the first scan, and access granted to at least one label. Every step is read from current state, never ticked by hand; attention marks a step that fails, such as a failed check or a withdrawn consent. Reads only. Repository admins.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The connection (cnx_…).
Example
cnx_01j9n4wzr0e008000000000001Responses
Section titled “Responses”OK
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.
Example
{ "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 } ]}The request is not valid: a malformed ID, body, filter or parameter.
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:validation-failed", "title": "The request is not valid.", "status": 400, "detail": "'id' must be an ID of the form cnx_… .", "code": "validation-failed", "field": "id"}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: 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 connection 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}