/
Copy of Query API requests

Copy of Query API requests

Overview

Check the list of available endpoints and methods to work with the Query API:

Endpoints and methods

Description

Endpoints and methods

Description

POST /query see below

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

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

 Deprecated date language expressions

A relative date range is a period of time that is relative to the current date (last week, last month, etc). You can add different operators to the from and to parameters of your query request to indicate specific time ranges. Note that the date you enter in the to parameter must always be greater than or equal to the from date.

Query response formats

Responses to your queries can be either returned to the source of the request, forwarded to an HDFSS3, 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:

Related content

Query API requests
Query API requests
More like this
Running queries with the Query API
Running queries with the Query API
More like this
Query API
Query API
More like this
Send requests with C#
Send requests with C#
More like this
Send requests with Postman
Send requests with Postman
More like this
Query API
Query API
More like this