This article lists and describes the parameters you can use in Devo Query API query requests as well as the different response formats:
...
Parameter | Type | Description |
---|---|---|
| String (header) | This is always |
| String (header) | Include this header if you want to use a token to authorize your request. When you use a token, only the See Authorizing Query API requests for more information. |
| String (header) | This is the Devo domain API key found in Administration → Credentials. |
| String (header) | HMAC SHA-256 using the API_SECRET to sign the concatenation of the api_key, body message and timestamp |
| String (header) | Timestamp in milliseconds. |
| String (body) | This is the query that you want to run, expressed in LINQ. To find the query's LINQ script, open the query in the Data Search area, then choose Query code editor from the toolbar. The body of the request must contain either the |
| String (body) | This is the ID of the query that you want to run. To find the query ID, open the query in the Data Search area, then choose Additional Tools → Current query → Get ID. The body of the request must contain either the |
| Number (body) | The start date as a UTC timestamp in seconds. See the Relative dates section below to learn more about this parameter. |
| Number (body) | The end date as a UTC timestamp in seconds. If this parameter is left out, the query will be continuous. See the Relative dates section below to learn more about this parameter. |
| Object (body) | This object contains the |
| String (body) | The format in which you want the response to be sent. The possible values are:
These response formats are fully described later in this article. When you indicate a response format other than |
| Object (body) | This object specifies where the response should be sent. If this object is left out of the request body, the response will be sent back to the request source. |
| String (body) | This is the type of system to which the response should be sent. The possible values are:
Depending on the |
| List (body) | Destination parameters, depend on the |
| String (body) | This is only required when you specify a
|
| String (body) | Change the timezone of the query, only for mode types different from JSON. This parameter supports any positive or negative GMT timezones, like |
| Number (body) | You can use either the |
| Number (body) | Limit the results of the query. The query will stop after returning the first X elements of the query or reaching its end. |
| Boolean (body) | Set this parameter to true ( |
| Boolean (body) | Set this parameter to true if you want to get progress info about the requested query. You will get an entry p with the timestamp of the event that is being processed at that moment. Progress info will be sent at most once every 5s. This is only available if you set |
...
Operator | Description |
---|---|
| Enter a number followed by
|
| Enter a number followed by
|
Anchor Query response formats Query response formats
Query response formats
Query response formats | |
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.
...
The JSON response will include the following fields:
Field name | Type | Description |
---|---|---|
| String | This describes the error in the case that the request was not successful. This field will be named The corresponding error code will be shown in the |
| Integer | Numeric value that specifies the error code. When it shows These are the possible error codes that you may get. The corresponding error descriptions will be displayed in the
Also, when you get a
|
| JSON Object | This object contains the query result. The format of the object's content depends on the query data. |
| String | An ID value to uniquely identify yourself across multiple systems. |
| String | Indicates the moment when a certain event occurred. |
Example
Here is a response in JSON format that occurred without error.
...
- The
m
object lists the fields included in each query result along with theirtype
andindex
metadata.
Field name | Description |
---|---|
type | The data type of the value returned. This will be one of:
|
index | An integer value that indicates the position of the field's value in the arrays returned in the object.d object. |
- The
metadata
object gives information about the fields as an array, and includes the following fields:
Field name | Description |
---|---|
name | Name of the field. |
type | The data type of the value returned. This will be one of:
|
- The object
d
includes lightweight event info.
Example
Here is an example of a response in JSON/compact format that occurred without error:
...
- The
m
object lists the fields included in each query result along with theirtype
andindex
metadata.
Field name | Description |
---|---|
type | The data type of the value returned. This will be one of:
|
index | An integer value that indicates the position of the field's value in the arrays returned in the object.d object. |
- The
metadata
object gives information about the fields as an array, and includes the following fields:
Field name | Description |
---|---|
name | Name of the field. |
type | The data type of the value returned. This will be one of:
|
- The object
d
includes the array of values with the returned events data. Every row is a valid JSON object.
...