curl --request POST \
--url 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apl": "[\"dataset-name\"] | limit 10",
"startTime": "string",
"endTime": "string"
}
'import requests
url = "https://api.axiom.co/v1/datasets/_apl?format=tabular"
payload = {
"apl": "[\"dataset-name\"] | limit 10",
"startTime": "string",
"endTime": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({apl: '["dataset-name"] | limit 10', startTime: 'string', endTime: 'string'})
};
fetch('https://api.axiom.co/v1/datasets/_apl?format=tabular', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.axiom.co/v1/datasets/_apl?format=tabular",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apl' => '["dataset-name"] | limit 10',
'startTime' => 'string',
'endTime' => 'string'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.axiom.co/v1/datasets/_apl?format=tabular"
payload := strings.NewReader("{\n \"apl\": \"[\\\"dataset-name\\\"] | limit 10\",\n \"startTime\": \"string\",\n \"endTime\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.axiom.co/v1/datasets/_apl?format=tabular")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"apl\": \"[\\\"dataset-name\\\"] | limit 10\",\n \"startTime\": \"string\",\n \"endTime\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v1/datasets/_apl?format=tabular")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apl\": \"[\\\"dataset-name\\\"] | limit 10\",\n \"startTime\": \"string\",\n \"endTime\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"format": "tabular",
"status": {
"elapsedTime": 260650,
"minCursor": "0d8q6stroluyo-07c3957e7400015c-0000c875",
"maxCursor": "0d8q6stroluyo-07c3957e7400015c-0000c877",
"blocksExamined": 4,
"blocksCached": 0,
"blocksMatched": 0,
"rowsExamined": 197604,
"rowsMatched": 197604,
"numGroups": 0,
"isPartial": false,
"cacheStatus": 1,
"minBlockTime": "2025-03-26T12:03:14Z",
"maxBlockTime": "2025-03-26T12:12:42Z"
},
"tables": [
{
"name": "0",
"sources": [
{
"name": "dataset-name"
}
],
"fields": [
{
"name": "_sysTime",
"type": "datetime"
},
{
"name": "_time",
"type": "datetime"
},
{
"name": "content_type",
"type": "string"
},
{
"name": "geo.city",
"type": "string"
},
{
"name": "geo.country",
"type": "string"
},
{
"name": "id",
"type": "string"
},
{
"name": "is_tls",
"type": "boolean"
},
{
"name": "message",
"type": "string"
},
{
"name": "method",
"type": "string"
},
{
"name": "req_duration_ms",
"type": "float"
},
{
"name": "resp_body_size_bytes",
"type": "integer"
},
{
"name": "resp_header_size_bytes",
"type": "integer"
},
{
"name": "server_datacenter",
"type": "string"
},
{
"name": "status",
"type": "string"
},
{
"name": "uri",
"type": "string"
},
{
"name": "user_agent",
"type": "string"
},
{
"name": "is_ok_2 ",
"type": "boolean"
},
{
"name": "city_str_len",
"type": "integer"
}
],
"order": [
{
"field": "_time",
"desc": true
}
],
"groups": [],
"range": {
"field": "_time",
"start": "1970-01-01T00:00:00Z",
"end": "2025-03-26T12:12:43Z"
},
"columns": [
[
"2025-03-26T12:12:42.68112905Z",
"2025-03-26T12:12:42.68112905Z",
"2025-03-26T12:12:42.68112905Z"
],
[
"2025-03-26T12:12:42Z",
"2025-03-26T12:12:42Z",
"2025-03-26T12:12:42Z"
],
[
"text/html",
"text/plain-charset=utf-8",
"image/jpeg"
],
[
"Ojinaga",
"Humboldt",
"Nevers"
],
[
"Mexico",
"United States",
"France"
],
[
"8af366cf-6f25-42e6-bbb4-d860ab535a60",
"032e7f68-b0ab-47c0-a24a-35af566359e5",
"4d2c7baa-ff28-4b1f-9db9-8e6c0ed5a9c9"
],
[
false,
false,
true
],
[
"QCD permutations were not solvable in linear time, expected compressed time",
"QCD permutations were not solvable in linear time, expected compressed time",
"Expected a new layer of particle physics but got a Higgs Boson"
],
[
"GET",
"GET",
"GET"
],
[
1.396373193863436,
0.16252390534308514,
0.4093416175186162
],
[
3448,
2533,
1906
],
[
84,
31,
29
],
[
"DCA",
"GRU",
"FRA"
],
[
"201",
"200",
"200"
],
[
"/api/v1/buy/commit/id/go",
"/api/v1/textdata/cnfigs",
"/api/v1/bank/warn"
],
[
"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko",
"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24",
"Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))"
],
[
true,
true,
true
],
[
7,
8,
6
]
]
}
],
"datasetNames": [
"dataset-name"
],
"fieldsMetaMap": {
"dataset-name": [
{
"name": "status",
"type": "",
"unit": "",
"hidden": false,
"description": "HTTP status code"
},
{
"name": "resp_header_size_bytes",
"type": "integer",
"unit": "none",
"hidden": false,
"description": ""
},
{
"name": "geo.city",
"type": "string",
"unit": "",
"hidden": false,
"description": "the city"
},
{
"name": "resp_body_size_bytes",
"type": "integer",
"unit": "decbytes",
"hidden": false,
"description": ""
},
{
"name": "content_type",
"type": "string",
"unit": "",
"hidden": false,
"description": ""
},
{
"name": "geo.country",
"type": "string",
"unit": "",
"hidden": false,
"description": ""
},
{
"name": "req_duration_ms",
"type": "float",
"unit": "ms",
"hidden": false,
"description": "Request duration"
}
]
}
}{
"code": 403,
"message": "Forbidden"
}Run query
Query
curl --request POST \
--url 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apl": "[\"dataset-name\"] | limit 10",
"startTime": "string",
"endTime": "string"
}
'import requests
url = "https://api.axiom.co/v1/datasets/_apl?format=tabular"
payload = {
"apl": "[\"dataset-name\"] | limit 10",
"startTime": "string",
"endTime": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({apl: '["dataset-name"] | limit 10', startTime: 'string', endTime: 'string'})
};
fetch('https://api.axiom.co/v1/datasets/_apl?format=tabular', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.axiom.co/v1/datasets/_apl?format=tabular",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apl' => '["dataset-name"] | limit 10',
'startTime' => 'string',
'endTime' => 'string'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.axiom.co/v1/datasets/_apl?format=tabular"
payload := strings.NewReader("{\n \"apl\": \"[\\\"dataset-name\\\"] | limit 10\",\n \"startTime\": \"string\",\n \"endTime\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.axiom.co/v1/datasets/_apl?format=tabular")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"apl\": \"[\\\"dataset-name\\\"] | limit 10\",\n \"startTime\": \"string\",\n \"endTime\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v1/datasets/_apl?format=tabular")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"apl\": \"[\\\"dataset-name\\\"] | limit 10\",\n \"startTime\": \"string\",\n \"endTime\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"format": "tabular",
"status": {
"elapsedTime": 260650,
"minCursor": "0d8q6stroluyo-07c3957e7400015c-0000c875",
"maxCursor": "0d8q6stroluyo-07c3957e7400015c-0000c877",
"blocksExamined": 4,
"blocksCached": 0,
"blocksMatched": 0,
"rowsExamined": 197604,
"rowsMatched": 197604,
"numGroups": 0,
"isPartial": false,
"cacheStatus": 1,
"minBlockTime": "2025-03-26T12:03:14Z",
"maxBlockTime": "2025-03-26T12:12:42Z"
},
"tables": [
{
"name": "0",
"sources": [
{
"name": "dataset-name"
}
],
"fields": [
{
"name": "_sysTime",
"type": "datetime"
},
{
"name": "_time",
"type": "datetime"
},
{
"name": "content_type",
"type": "string"
},
{
"name": "geo.city",
"type": "string"
},
{
"name": "geo.country",
"type": "string"
},
{
"name": "id",
"type": "string"
},
{
"name": "is_tls",
"type": "boolean"
},
{
"name": "message",
"type": "string"
},
{
"name": "method",
"type": "string"
},
{
"name": "req_duration_ms",
"type": "float"
},
{
"name": "resp_body_size_bytes",
"type": "integer"
},
{
"name": "resp_header_size_bytes",
"type": "integer"
},
{
"name": "server_datacenter",
"type": "string"
},
{
"name": "status",
"type": "string"
},
{
"name": "uri",
"type": "string"
},
{
"name": "user_agent",
"type": "string"
},
{
"name": "is_ok_2 ",
"type": "boolean"
},
{
"name": "city_str_len",
"type": "integer"
}
],
"order": [
{
"field": "_time",
"desc": true
}
],
"groups": [],
"range": {
"field": "_time",
"start": "1970-01-01T00:00:00Z",
"end": "2025-03-26T12:12:43Z"
},
"columns": [
[
"2025-03-26T12:12:42.68112905Z",
"2025-03-26T12:12:42.68112905Z",
"2025-03-26T12:12:42.68112905Z"
],
[
"2025-03-26T12:12:42Z",
"2025-03-26T12:12:42Z",
"2025-03-26T12:12:42Z"
],
[
"text/html",
"text/plain-charset=utf-8",
"image/jpeg"
],
[
"Ojinaga",
"Humboldt",
"Nevers"
],
[
"Mexico",
"United States",
"France"
],
[
"8af366cf-6f25-42e6-bbb4-d860ab535a60",
"032e7f68-b0ab-47c0-a24a-35af566359e5",
"4d2c7baa-ff28-4b1f-9db9-8e6c0ed5a9c9"
],
[
false,
false,
true
],
[
"QCD permutations were not solvable in linear time, expected compressed time",
"QCD permutations were not solvable in linear time, expected compressed time",
"Expected a new layer of particle physics but got a Higgs Boson"
],
[
"GET",
"GET",
"GET"
],
[
1.396373193863436,
0.16252390534308514,
0.4093416175186162
],
[
3448,
2533,
1906
],
[
84,
31,
29
],
[
"DCA",
"GRU",
"FRA"
],
[
"201",
"200",
"200"
],
[
"/api/v1/buy/commit/id/go",
"/api/v1/textdata/cnfigs",
"/api/v1/bank/warn"
],
[
"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko",
"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24",
"Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))"
],
[
true,
true,
true
],
[
7,
8,
6
]
]
}
],
"datasetNames": [
"dataset-name"
],
"fieldsMetaMap": {
"dataset-name": [
{
"name": "status",
"type": "",
"unit": "",
"hidden": false,
"description": "HTTP status code"
},
{
"name": "resp_header_size_bytes",
"type": "integer",
"unit": "none",
"hidden": false,
"description": ""
},
{
"name": "geo.city",
"type": "string",
"unit": "",
"hidden": false,
"description": "the city"
},
{
"name": "resp_body_size_bytes",
"type": "integer",
"unit": "decbytes",
"hidden": false,
"description": ""
},
{
"name": "content_type",
"type": "string",
"unit": "",
"hidden": false,
"description": ""
},
{
"name": "geo.country",
"type": "string",
"unit": "",
"hidden": false,
"description": ""
},
{
"name": "req_duration_ms",
"type": "float",
"unit": "ms",
"hidden": false,
"description": "Request duration"
}
]
}
}{
"code": 403,
"message": "Forbidden"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
legacy, tabular When saveAsKind is true, this parameter indicates the name of the associated dataset.
Body
APL query to execute. For more information, see Introduction to APL.
Show child attributes
Show child attributes
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)
Variables is an optional set of additional variables that are inserted into the APL
Show child attributes
Show child attributes
Response
Successful APL result
Format specifies the result set format. Either "legacy" (default) or "tabular".
Show child attributes
Show child attributes
Show child attributes
Show child attributes
FieldsMetaMap contains the unit information (if we have it) for each field in the given dataset entry
Show child attributes
Show child attributes
Matches hold the matching events of a filter query in the "legacy" result format
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Tables hold the result tables in the "tabular" result format
Show child attributes
Show child attributes
Was this page helpful?