Returns the search results for the given named query.
Base Request
POST /api/query/named
Headers
Header Name | Description | Required | Values |
---|---|---|---|
Authorization | The access token | Required |
Bearer [access_token]
where [access_token] is a string generated when you complete authentication (see Getting Started) |
User-Agent | Identity of the client making the request to the server | Required |
[product]/[version]
where [product] is the name of the software you are using to make the request and [version] is the numbered version of the software (for example, MyCompanyProduct/1.0). For information on other types of values commonly included in user-agent request headers, see the User-Agent HTTP header reference section on the Mozilla developer documentation website. |
Accept | The format of the data to be returned | Optional | application/vnd.hxcs.v1+json |
Content-Type | The format of the data to be posted | Optional | application/json |
Request Body
Element | Description | Type | Required | Notes |
---|---|---|---|---|
queryName | The name of the HXQL query. | string | Optional | None |
selectedQuickFilters | List of the filters to be applied to the search results. | array | Optional | None |
skipAggregates | True/false indicator of whether to skip any aggregate filters defined for the search results. | Boolean | Optional | None |
See Query for more information on the additional, more common elements listed in the body of the following sample request.
Sample Request
POST /api/query/named
Authorization: Bearer [access_token]
User-Agent: MyCompanyProduct/1.0
Accept: application/vnd.hxcs.v1+json
Content-Type: application/json
{
"queryName": "string",
"repositoryId": "default",
"limit": 100,
"offset": 100,
"trackTotalCount": true,
"trackTotalCountUpTo": 0,
"parameters": {
"additionalProp1": {}
},
"sort": [
"sys_title"
],
"selectedQuickFilters": "exclude documents that are not article: myts_nature != \"article\"",
"skipAggregates": true
}
Response
See Query for response body details and a sample response.
Status Codes and Errors
The following table lists the returned status codes.
Code | Description | Notes |
---|---|---|
200 | OK | The search results for the named query have been returned successfully. |
401 | Not Authorized | Authentication has failed or was not provided. |
403 | Not Allowed | Access permissions are invalid or missing. |
404 | Not Found | The named query could not be found. |