We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/document/describe

The user must be authenticated and have read permissions to the site.

This API lists the available fields for /document/search for a site. The fields returned are those fields that are available for use in query/filter/sort. There is no guarantee that documents returned will contain all described fields, and documents can also contain non-searchable fields not described.

Request

The request object has the following fields:

Name

Type

Required

Description

siteId

String

Yes

The siteId.

Response

The response object has the following fields:

Name

Type

Description

fields

Array of Field

The fields.

Field

The Field object has the following fields

Name

Type

Description

name

String

The name of the field

type

String

The type of the field.

Example

$ cx.py /document/describe '{"siteId":"1136173600172155306"}'
{
 "fields": [
 {
 "name": "body",
 "type": "string"
 },
 {
 "name": "dominantimage",
 "type": "string"
 },
 {
 "name": "id",
 "type": "string"
 },
 {
 "name": "kw-pageclass",
 "type": "string"
 },
 {
 "name": "publishtime",
 "type": "time"
 },
 {
 "name": "recs-expirationtime",
 "type": "time"
 },
 {
 "name": "title",
 "type": "string"
 },
 {
 "name": "url",
 "type": "string"
 },
 {
 "name": "xxx-blatt",
 "type": "string"
 },
 {
 "name": "xxx-epoch",
 "type": "string"
 },
 {
 "name": "xxx-some-image86",
 "type": "image"
 },
 {
 "name": "xxx-my-set",
 "type": "set"
 }
 ]
}

Last updated: