Run query (legacy)
Query (Legacy)
Parameters #
| Property | Type | Location | Description |
|---|---|---|---|
saveAsKind | string | query | |
dataset_name | stringRequired | path | Unique name of the dataset. |
streaming-duration | string | query | |
nocache | boolean | query |
Body #
application/json| Property | Type | Description |
|---|---|---|
aggregations | object[] | |
alias | string | |
argument | object | |
field | stringRequired | |
op | stringRequired | |
continuationToken | string | |
cursor | string | A cursor for use in pagination. Use the cursor string returned in previous responses to fetch the next or previous page of results. |
endTime | stringRequired | |
filter | object | |
caseSensitive | boolean | Supported for these filters: starts-with, not-starts-with, ends-with, not-ends-with, contains, not-contains, eq, ne. |
children | string[] | Supported for these filters: and, or, not. |
field | stringRequired | |
op | stringRequired | 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. |
value | object | |
groupBy | string[] | |
includeCursor | boolean | Specifies whether to include the row identified by the cursor in the results. Default is false. |
limit | integer<uint32> | Specifies the maximum number of events to return. Default is 1000, minimum is 0, maximum is 50000. |
order | object[] | |
desc | booleanRequired | |
field | stringRequired | |
project | object[] | |
alias | string | |
field | stringRequired | |
queryOptions | object | |
against | string | |
againstStart | string | |
againstTimestamp | string | |
aggChartOpts | string | |
caseSensitive | string | |
containsTimeFilter | string | |
datasets | string | |
displayNull | string | |
editorContent | string | |
endColumn | string | |
endLineNumber | string | |
endTime | string | |
integrationsFilter | string | |
openIntervals | string | |
quickRange | string | |
resolution | string | |
shownColumns | string | |
startColumn | string | |
startLineNumber | string | |
startTime | string | |
timeSeriesVariant | string | |
timeSeriesView | string | |
resolution | stringRequired | 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". |
startTime | stringRequired | 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) |
virtualFields | object[] | |
alias | stringRequired | |
expr | stringRequired |
Request #
curl -X POST 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \
-H 'Authorization: Bearer API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"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"}'Try itRun this request against your Axiom organization
Credentials stay in this browser tab and are only sent to Axiom when you run the request.
Response #
200Result403Forbidden| Property | Type | Description |
|---|---|---|
buckets | objectRequired | |
series | object[] | |
endTime | string<date-time>Required | |
groups | object[] | |
aggregations | object[] | |
data | object | |
op | stringRequired | |
value | objectRequired | |
group | objectRequired | |
id | integer<uint64>Required | |
startTime | string<date-time>Required | |
totals | object[] | |
aggregations | object[] | |
data | object | |
op | stringRequired | |
value | objectRequired | |
group | objectRequired | |
id | integer<uint64>Required | |
fieldsMeta | object[] | FieldsMeta contains the unit information (if we have it) for each field |
description | string | |
hidden | booleanRequired | |
name | stringRequired | |
type | stringRequired | |
unit | stringRequired | |
format | stringRequired | Format specifies the result set format. Either "legacy" (default) or "tabular". |
matches | object[] | Matches hold the matching events of a filter query in the "legacy" result format |
_rowId | stringRequired | |
_sysTime | string<date-time>Required | |
_time | string<date-time>Required | |
data | objectRequired | |
status | objectRequired | |
blocksExamined | integer<uint64>Required | |
cacheStatus | integer<uint8>Required | |
continuationToken | string | |
elapsedTime | integer<int64>Required | |
isEstimate | boolean | |
isPartial | booleanRequired | |
maxBlockTime | string<date-time>Required | |
maxCursor | string | 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). |
messages | object[] | |
code | string | |
count | integer<int64>Required | |
msg | stringRequired | |
priority | stringRequired | |
minBlockTime | string<date-time>Required | |
minCursor | string | 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). |
numGroups | integer<uint32>Required | |
rowsExamined | integer<uint64>Required | |
rowsMatched | integer<uint64>Required | |
tables | object[] | Tables hold the result tables in the "tabular" result format |
buckets | object | The standard mode of operation is to create buckets on the _time column, |
field | stringRequired | Field specifies the field used to create buckets on. Normally this would be _time. |
size | objectRequired | An integer or float representing the fixed bucket size. When the bucket field is _time this value is in nanoseconds. |
columns | object[][] | Columns contain a series of arrays with the raw result data. The columns here line up with the fields in the Fields array. |
fields | object[]Required | 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. |
agg | object | AggInfo captures information about an aggregation |
args | object[] | Args specifies any non-field arguments for the aggregation. Fx. [10] for topk(players, 10). |
fields | string[] | Fields specifies the names of the fields this aggregation is computed on. Fx ["players"] for topk(players, 10) |
name | stringRequired | 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 |
name | stringRequired | |
type | stringRequired | |
groups | object[]Required | Groups specifies which grouping operations has been performed on the results. |
name | string | |
name | stringRequired | Name is the name assigned to this table. Defaults to "0". The name "_totals" is reserved for system use. |
order | object[]Required | Order echoes the ordering clauses that was used to sort the results. |
desc | booleanRequired | |
field | stringRequired | |
range | object | |
end | string<date-time>Required | End is the ending time the query is limited by. Queries are restricted to the interval [start,end). |
field | stringRequired | Field specifies the field name on which the query range was restricted. Normally _time |
start | string<date-time>Required | Start is the starting time the query is limited by. Queries are restricted to the interval [start,end). |
sources | object[]Required | Sources contain the names of the datasets that contributed data to these results. |
name | stringRequired |