Query (Legacy)
curl --request POST \
--url https://api.axiom.co/v1/datasets/{dataset_name}/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aggregations": [],
"continuationToken": "string",
"cursor": "string",
"endTime": "string",
"filter": {},
"groupBy": [
"string"
],
"includeCursor": true,
"limit": 10,
"order": [
{
"desc": true,
"field": "string"
}
],
"project": [
{
"alias": "string",
"field": "string"
}
],
"queryOptions": {
"displayNull": "0"
},
"resolution": "string",
"startTime": "string"
}
'{
"buckets": {
"series": [
{
"endTime": "2022-07-26T03:00:48.925Z",
"groups": [
{
"aggregations": [
{
"op": "string",
"value": {}
}
],
"group": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"id": 0
}
],
"startTime": "2022-07-26T03:00:48.925Z"
}
],
"totals": [
{
"aggregations": [
{
"op": "string",
"value": {}
}
],
"group": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"id": 0
}
]
},
"fieldsMeta": [
{
"description": "string",
"hidden": true,
"name": "string",
"type": "string",
"unit": "string"
}
],
"matches": [
{
"_rowId": "string",
"_sysTime": "2022-07-26T03:00:48.925Z",
"_time": "2022-07-26T03:00:48.925Z",
"data": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
}
],
"status": {
"blocksExamined": 0,
"cacheStatus": 0,
"continuationToken": "string",
"elapsedTime": 0,
"isEstimate": true,
"isPartial": true,
"maxBlockTime": "2022-07-26T03:00:48.925Z",
"messages": [
{
"code": "string",
"count": 0,
"msg": "string",
"priority": "string"
}
],
"minBlockTime": "2022-07-26T03:00:48.925Z",
"numGroups": 0,
"rowsExamined": 0,
"rowsMatched": 0
}
}The access token received from the authorization server in the OAuth 2.0 flow.
Unique name of the dataset.
The time resolution of the query’s graph, in seconds. Valid values are the query’s time range /100 at maximum and /1000 at minimum or "auto".
start and end time for the query, these must be specified as RFC3339 strings or using relative time expressions (e.g. now-1h, now-1d, now-1w, etc)
A cursor for use in pagination. Use the cursor string returned in previous responses to fetch the next or previous page of results.
Show child attributes
We also support '==', but we’re not exporting that to swagger, because it can’t deal with it add >, >=, <, <= to that list, it breaks codegen.
and, or, not, eq, !=, ne, exists, not-exists, gt, gte, lt, lte, starts-with, not-starts-with, ends-with, not-ends-with, contains, not-contains, regexp, not-regexp Supported for these filters: starts-with, not-starts-with, ends-with, not-ends-with, contains, not-contains, eq, ne.
Supported for these filters: and, or, not.
Specifies whether to include the row identified by the cursor in the results. Default is false.
Specifies the maximum number of events to return. Default is 1000, minimum is 0, maximum is 50000.
Show child attributes
Result
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Format specifies the result set format. Either "legacy" (default) or "tabular".
Show child attributes
Row id of the newest row, as seen server side. May be higher than what the results include if the server scanned more data than included in the results. Can be used to efficiently resume time-sorted non-aggregating queries (ie filtering only).
Row id of the oldest row, as seen server side. May be lower than what the results include if the server scanned more data than included in the results. Can be used to efficiently resume time-sorted non-aggregating queries (ie filtering only).
Tables hold the result tables in the "tabular" result format
Show child attributes
Fields contain information about the fields included in these results. The order of the fields match up with the order of the data in Columns.
Show child attributes
AggInfo captures information about an aggregation
Show child attributes
Name is the system name of the aggregation, which is the string form of aggregation.Type. If the aggregation is aliased, the alias is stored in the parent FieldInfo
Args specifies any non-field arguments for the aggregation. Fx. [10] for topk(players, 10).
Fields specifies the names of the fields this aggregation is computed on. Fx ["players"] for topk(players, 10)
Name is the name assigned to this table. Defaults to "0". The name "_totals" is reserved for system use.
The standard mode of operation is to create buckets on the _time column,
Columns contain a series of arrays with the raw result data. The columns here line up with the fields in the Fields array.
Show child attributes
End is the ending time the query is limited by. Queries are restricted to the interval [start,end).
Field specifies the field name on which the query range was restricted. Normally _time
Start is the starting time the query is limited by. Queries are restricted to the interval [start,end).
Was this page helpful?
curl --request POST \
--url https://api.axiom.co/v1/datasets/{dataset_name}/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"aggregations": [],
"continuationToken": "string",
"cursor": "string",
"endTime": "string",
"filter": {},
"groupBy": [
"string"
],
"includeCursor": true,
"limit": 10,
"order": [
{
"desc": true,
"field": "string"
}
],
"project": [
{
"alias": "string",
"field": "string"
}
],
"queryOptions": {
"displayNull": "0"
},
"resolution": "string",
"startTime": "string"
}
'{
"buckets": {
"series": [
{
"endTime": "2022-07-26T03:00:48.925Z",
"groups": [
{
"aggregations": [
{
"op": "string",
"value": {}
}
],
"group": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"id": 0
}
],
"startTime": "2022-07-26T03:00:48.925Z"
}
],
"totals": [
{
"aggregations": [
{
"op": "string",
"value": {}
}
],
"group": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"id": 0
}
]
},
"fieldsMeta": [
{
"description": "string",
"hidden": true,
"name": "string",
"type": "string",
"unit": "string"
}
],
"matches": [
{
"_rowId": "string",
"_sysTime": "2022-07-26T03:00:48.925Z",
"_time": "2022-07-26T03:00:48.925Z",
"data": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
}
],
"status": {
"blocksExamined": 0,
"cacheStatus": 0,
"continuationToken": "string",
"elapsedTime": 0,
"isEstimate": true,
"isPartial": true,
"maxBlockTime": "2022-07-26T03:00:48.925Z",
"messages": [
{
"code": "string",
"count": 0,
"msg": "string",
"priority": "string"
}
],
"minBlockTime": "2022-07-26T03:00:48.925Z",
"numGroups": 0,
"rowsExamined": 0,
"rowsMatched": 0
}
}