Skip to content

One offered type's source fields, with the standard source fields and, for a content type, the content properties.

GET
/v1/admin/connections/{id}/offered-document-types/{name}
curl --request GET \
--url https://api.contentsurface.io/v1/admin/connections/cnx_01j9n4wzr0e008000000000001/offered-document-types/Account \
--header 'Authorization: Bearer <token>'

One offered type’s fields as the source lists them, the standard fields, and — for types with content — the content properties, each with the attribute it is mapped to; for an assigned type also the standard fields to assign, with suggestions. Field names are source configuration, shown to admins only. Repository admins.

id
required
string

The connection (cnx_…).

Example

cnx_01j9n4wzr0e008000000000001
name
required
string

The offered type’s name.

Example

Account

OK

Media typeapplication/json

An offered document type in full: its fields, and what else can be mapped.

object
type
required

The type.

object
name
required

The type’s name, such as Account or a table’s name.

string
label
required

Its display label.

string
isStatic
required

True when the connector reports it the same way for every connection, such as File; it can be defined once for all.

boolean
isFolder
required

True when its items can have children.

boolean
isContent
required

True when its items have content to open.

boolean
definition
required
One of:
null
standardFields

native (the connector fills name, dates and the like itself) or assigned (the definition must say which fields supply them; the type is usable only once defined).

string
default: native
holdsPersonalData

True when its items describe people, such as contacts or users: a reminder before defining or mounting it.

boolean
fields
required

The fields the source lists for it.

Array<object>

A field the source lists for a document type, as the connector describes it.

object
name
required

The field’s name in the source.

string
label
required

Its display label.

string
dataType
required

The attribute data type it maps to; null when none fits and it cannot be mapped.

null | string
sourceType
required

Its type in the source, for information.

null | string
isMultiValued
required

True when it holds several values.

boolean
isMandatory
required

True when the source always fills it.

boolean
isReference
required

True when it holds another item’s identifier.

boolean
isInternal
required

True when it can map only to an internal attribute, such as a link into the source: usable for relations, never returned.

boolean
suggestedKey
required

A key for a new attribute filled from the field; another may be chosen.

string
mappedTo
required
One of:
null
isFilterable

True when the connector can list items by it: a hierarchy level may match on it.

boolean
isPersonal

True when it holds personal data, such as an email address, phone number or a person’s name: map it only knowingly.

boolean
isMasterDetail

True when it points to the item’s master in the source’s own master–detail relationship, or a standard detail object’s master: a proposal for an owned relation over it, which the Portal pre-ticks for the admin to confirm. Nothing is created from it.

boolean
referenceTo

The offered type the reference points to, where the source says so (a database foreign key, a Salesforce lookup): a proposal for a relation definition. Nothing is created from it.

null | string
referenceField

The field of that type whose value the reference holds; null when it holds that type’s item identifier (a Salesforce lookup), so a relation matches it against sourceId.

null | string
proposal
One of:
null
standardFields
required

The standard fields every item has, which can be mapped to attributes too.

Array<object>

A standard field or content property that can be mapped to an attribute.

object
name
required

What a mapping names: $name-style for a standard field, such as $createdBy; the property’s name for a content property, such as pageCount.

string
dataType
required

Its data type.

string
mappedTo
required
One of:
null
contentProperties
required

For types with content: what is read from the document itself, such as its title or page count.

Array<object>

A standard field or content property that can be mapped to an attribute.

object
name
required

What a mapping names: $name-style for a standard field, such as $createdBy; the property’s name for a content property, such as pageCount.

string
dataType
required

Its data type.

string
mappedTo
required
One of:
null
slots

For an assigned type: the standard fields to assign, with the connector’s suggestions; empty otherwise.

Array<object> | null

One standard field an assigned type’s definition may assign, with the connector’s suggestion.

object
slot
required

The standard field: sourceId, name, createdAt, createdBy, modifiedAt, modifiedBy, content, changeMarker, excluded or parentId.

string
isRequired
required

True when the type cannot be defined without it.

boolean
isMultiple
required

True when it takes several fields, such as a key of several columns.

boolean
candidates
required

The source fields the connector accepts for it.

Array<string>
proposed
required

The connector’s suggestion, to confirm or change; empty when it has none.

Array<string>
reason
required

Why it suggests that: primaryKey, uniqueIndex, nameField, namedLike or selfReference; null without a suggestion.

null | string
parentTypes

For parentId: which type each candidate field points into; null for other slots.

null | object
assigned
One of:
null

Example

{
"type": {
"name": "Contact",
"label": "Contact",
"isStatic": true,
"isFolder": false,
"isContent": false,
"definition": null,
"standardFields": "native",
"holdsPersonalData": true
},
"fields": [
{
"name": "AccountId",
"label": "Account ID",
"dataType": "text",
"sourceType": "reference",
"isMultiValued": false,
"isMandatory": false,
"isReference": true,
"isInternal": true,
"suggestedKey": "salesforce.accountId",
"mappedTo": null,
"isFilterable": true,
"isPersonal": false,
"isMasterDetail": true,
"referenceTo": "Account",
"referenceField": "Id",
"proposal": null
},
{
"name": "Title",
"label": "Title",
"dataType": "text",
"sourceType": "string",
"isMultiValued": false,
"isMandatory": false,
"isReference": false,
"isInternal": false,
"suggestedKey": "salesforce.title",
"mappedTo": null,
"isFilterable": false,
"isPersonal": false,
"isMasterDetail": false,
"referenceTo": null,
"referenceField": null,
"proposal": null
},
{
"name": "LeadSource",
"label": "Lead source",
"dataType": "text",
"sourceType": "picklist",
"isMultiValued": false,
"isMandatory": false,
"isReference": false,
"isInternal": false,
"suggestedKey": "salesforce.leadSource",
"mappedTo": null,
"isFilterable": false,
"isPersonal": false,
"isMasterDetail": false,
"referenceTo": null,
"referenceField": null,
"proposal": {
"isKeyword": true,
"isEmbedded": true,
"isPreview": true,
"reason": "picklist"
}
},
{
"name": "Email",
"label": "Email",
"dataType": "text",
"sourceType": "email",
"isMultiValued": false,
"isMandatory": false,
"isReference": false,
"isInternal": false,
"suggestedKey": "salesforce.email",
"mappedTo": null,
"isFilterable": false,
"isPersonal": true,
"isMasterDetail": false,
"referenceTo": null,
"referenceField": null,
"proposal": null
}
],
"standardFields": [
{
"name": "$name",
"dataType": "text",
"mappedTo": null
},
{
"name": "$createdBy",
"dataType": "text",
"mappedTo": null
}
],
"contentProperties": [],
"slots": null,
"assigned": null
}

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 offered document type 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
}