Returns the definition of the named query.
Base Request
GET /api/query/named/[namedQuery]
where [namedQuery] is the alphanumeric ID for the named query.
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 |
Sample Request
GET /api/query/named/[namedQuery] Authorization: Bearer [access_token] User-Agent: MyCompanyProduct/1.0 Accept: application/vnd.hxcs.v1+json
Response Body
Element | Description | Type | Notes |
---|---|---|---|
name | The name of the query. | string | None |
aliases | List of any aliases defined for the named query. | array | None |
whereClauseDefinition | List of the elements that were used to define the WHERE clause of the advanced query. | array | None |
sort | List of the fields that were used to sort the search results. | array | None |
aggregateDefinitions | List of the aggregate definitions that were used to filter the search results. | array | None |
quickFilters | List of the filters that have been applied to the search results. | array | None |
Sample Response
{ "name": "string", "aliases": [ "string" ], "whereClauseDefinition": { "query": "string", "predicates": [ { "searchParameter": "sys_title", "operator": "LIKE", "parameters": [ { "name": "titleMatch", "defaultValue": {} } ], "hint": "string" } ] }, "sort": [ "string" ], "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" } ], "quickFilters": [ { "name": "string", "clause": "string", "sort": [ "string" ] } ] }
Status Codes and Errors
The following table lists the returned status codes.
Code | Description | Notes |
---|---|---|
200 | OK | The definition of the named query has 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. |