Get Search Results Count
OVERVIEW
Overview
Get search results count from Publisher.
Search requests are made via POST to enable complexity of the search request.
Since v5.0
HTTP Request
POST /api/2/search/count
HTTP Request Object
Search request object either in JSON or XML format.
HTTP Headers
HTTP Request Header | Description | Example |
---|---|---|
Authorization | The API Authorisation token | "Bearer XXXXXXXXXXXXX" |
Accept |
The format of the expected response.
If no parameter is set, JSON is the default response given. |
"application/xml" |
Content-Type |
The format of the provided content.
If no parameter is set, JSON is the expected content by default. |
"application/json" |
HTTP Response
Success
HTTP response 200 with progressive key object
(Example below)
Example HTTP Request & Response
GET http://example.com/context/api/2/search/count
JSON Request
{
"searchquery": {
"limit": "10",
"offset": "0",
"startdocumentindex": 0,
"query": "test",
"advancedquery": {
"all": null,
"any": "test search string",
"exclude": null
},
"date": {
"from": "20161201",
"to": "20181201"
},
"sort": "relevance",
"user": "user.name@example.com",
"language": "en_US",
"contenttypes": [
7
]
}
}
JSON Response
{
"progressivekey": "1err3I1jzT_1534244823138",
"progressivekeystatus": "INPROGRESS"
}
Comments
0 Comments