Skip to content

What the tenant's setup still needs: a connection, notice recipients, and each unfinished connection's steps.

GET
/v1/admin/setup
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.

OK

Media typeapplication/json

The tenant’s setup checklist.

object
complete
required

True when every tenant step is done and every connection’s setup is complete.

boolean
steps
required

The tenant’s own steps: connection, noticeRecipients.

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*)$/
connections
required

Connections whose setup is not complete, by name, at most 10.

Array<object>

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*)$/
incompleteConnections
required

How many connections’ setup is not complete.

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

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

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: tenantAdmin, 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
}