Overview
Check the list of available endpoints and methods to work with the Query API:
Endpoints and methods | Description |
---|---|
POST | Run a query. |
Endpoints and methods
POST /query
Use this endpoint tu run a query through the API.
Relative time-ranges
The Query API supports the same language for relative days as the one used in the Data Search section.
Let's suppose the current time (which we refer to as "now()") is Sunday, 05 February 2017, 13:37:05. The table below shows the resulting time when different expressions are applied.
Time expression | Description | Resulting time |
---|---|---|
now() - 60m | 60 minutes ago | Sunday, 05 February 2017, 12:37:05 |
now() @ 1h | Now (rounded to the beginning of the hour) | Sunday, 05 February 2017, 13:00:00 |
now() - 24h | 24 hours ago | Saturday, 04 February 2017, 13:37:05 |
(now() - 1d) @ 1d | Yesterday (rounded to the beginning of the day) | Saturday, 04 February 2017, 00:00:00 |
(now() - 2d) @ 1d | 2 days ago (rounded to the beginning of the day) | Friday, 03 February 2017, 00:00:00 |
(now() - 2d) @ 1m | 2 days ago (rounded to the beginning of the minute) | Friday, 03 February 2017, 13:37:00 |
((now() - 2d) @ 1d) - 2h | 2 days ago (rounded to the beginning of the day minus 2 hours) | Thursday, 02 February 2017, 22:00:00 |
now() @ 1w | Locale week | Sunday, 05 February 2017, 00:00:00 |
now() @ 1W | ISO week | Monday, 30 January 2017, 00:00:00 |
now() ^ 6d | Replace the day with 6 | Monday, 06 February 2017, 13:37:05 |
now() ^ 2018y3M6d15h30m20s |
| Tuesday, 06 March 2018, 15:30:20 |
Query response formats
Responses to your queries can be either returned to the source of the request, forwarded to an HDFS, S3, SNMP, or Kafka type system, or sent via email.
Given the different possible destinations for query responses, you can also specify the format in which you want the response to be sent. This is specified in the mode.type
parameter of the request body. The available response formats are: