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 |
|---|---|---|---|
|
|
String |
Yes |
The siteId. |
Response
The response object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of Field |
The fields. |
Field
The Field object has the following fields
|
Name |
Type |
Description |
|---|---|---|
|
|
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"
}
]
}