Returns the advanced search results for the specified query
Base Request
POST /api/query/advanced
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 |
---|---|---|---|---|
trackTotalCountUpTo | The maximum number of documents to count in the search results. | integer | Optional | None |
sort | List of the fields to be used to sort the search results. | array | Optional | None |
parameters | List of the parameters to be used to filter the list of aggregate definitions. | array | Optional | None |
whereClauseDefinition | List of the elements to be used to define the WHERE clause of an advanced query. | array | Optional | Using the example values for whereClauseDefinition and other elements in the sample request following this table would build the resulting query: SELECT * FROM SysFile WHERE sys_title LIKE 'My Other File*' AND myts_nature != 'article' ORDER BY sys_title. |
quickFilterClauses | List of the clauses to be used to filter documents in the search results. | array | Optional | Can be used as an alternative to full HXQL queries. |
aggregateDefinitions | List of the aggregate definitions to be used to filter the search results. | array | 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/advanced
Authorization: Bearer [access_token]
User-Agent: MyCompanyProduct/1.0
Accept: application/vnd.hxcs.v1+json
Content-Type: application/json
{
"repositoryId": "default",
"query": "SELECT * FROM SysContent",
"limit": 0,
"offset": 0,
"trackTotalCount": true,
"trackTotalCountUpTo": 0,
"sort": [
"sys_title"
],
"parameters": {
"titleMatch": "My Other File*",
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"whereClauseDefinition": {
"query": "string",
"predicates": [
{
"searchParameter": "sys_title",
"operator": "LIKE",
"parameters": [
{
"name": "titleMatch",
"defaultValue": {}
}
],
"hint": "string"
}
]
},
"quickFilterClauses": "exclude documents that are not article: myts_nature != \"article\"",
"aggregateDefinitions": [
{
"id": "string",
"type": "string",
"properties": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"ranges": [
{
"key": "medium",
"from": 2048.0,
"to": 6144.0
}
],
"dateRanges": [
{
"key": "string",
"from": "string",
"to": "string"
}
],
"searchParameter": "string",
"parameter": "string"
}
]
}
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 advanced search results for the specified query have been returned successfully. |
401 | Not Authorized | Authentication has failed or was not provided. |
403 | Not Allowed | Access permissions are invalid or missing. |