Skip to content

A connection's setup checklist, each step read from its current state.

GET
/v1/admin/connections/{id}/setup
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.

id
required
string

The connection (cnx_…).

Example

cnx_01j9n4wzr0e008000000000001

OK

Media typeapplication/json

A connection’s setup checklist.

object
connectionId
required

The connection (cnx_…).

string
name
required

Its name.

string
connectorType
required

Its connector type.

string
complete
required

True when every step is done.

boolean
steps
required

Its steps, in the order they are done.

Array<object>

One step of a setup checklist.

object
key
required

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).

string
state
required

done, todo (still to do) or attention (failing: something needs fixing, such as a withdrawn consent or a failed check).

string
code
required

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.

null | string
count
required

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.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

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.

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": "'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).

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 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.

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
}