cURL
curl --request POST \
--url https://api.axiom.co/v2/apl-starred-queries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "apl",
"metadata": {},
"name": "<string>",
"query": {
"apl": "<string>",
"cursor": "<string>",
"defaultLimit": 123,
"defaultOrder": [
{
"desc": true,
"field": "<string>"
}
],
"endTime": "<string>",
"includeCursor": true,
"includeCursorField": true,
"libraries": [
"<string>"
],
"queryOptions": {
"disableCache": true,
"disableStats": true,
"disableTrace": true,
"maxDataPoints": 123,
"maxSeries": 123,
"noAggregation": true,
"noFill": true,
"noInterpolation": true,
"resolution": "<string>"
},
"startTime": "<string>",
"variables": {}
},
"who": "<string>",
"dataset": "<string>"
}
'import requests
url = "https://api.axiom.co/v2/apl-starred-queries"
payload = {
"kind": "apl",
"metadata": {},
"name": "<string>",
"query": {
"apl": "<string>",
"cursor": "<string>",
"defaultLimit": 123,
"defaultOrder": [
{
"desc": True,
"field": "<string>"
}
],
"endTime": "<string>",
"includeCursor": True,
"includeCursorField": True,
"libraries": ["<string>"],
"queryOptions": {
"disableCache": True,
"disableStats": True,
"disableTrace": True,
"maxDataPoints": 123,
"maxSeries": 123,
"noAggregation": True,
"noFill": True,
"noInterpolation": True,
"resolution": "<string>"
},
"startTime": "<string>",
"variables": {}
},
"who": "<string>",
"dataset": "<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({
kind: 'apl',
metadata: {},
name: '<string>',
query: {
apl: '<string>',
cursor: '<string>',
defaultLimit: 123,
defaultOrder: [{desc: true, field: '<string>'}],
endTime: '<string>',
includeCursor: true,
includeCursorField: true,
libraries: ['<string>'],
queryOptions: {
disableCache: true,
disableStats: true,
disableTrace: true,
maxDataPoints: 123,
maxSeries: 123,
noAggregation: true,
noFill: true,
noInterpolation: true,
resolution: '<string>'
},
startTime: '<string>',
variables: {}
},
who: '<string>',
dataset: '<string>'
})
};
fetch('https://api.axiom.co/v2/apl-starred-queries', 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/v2/apl-starred-queries",
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([
'kind' => 'apl',
'metadata' => [
],
'name' => '<string>',
'query' => [
'apl' => '<string>',
'cursor' => '<string>',
'defaultLimit' => 123,
'defaultOrder' => [
[
'desc' => true,
'field' => '<string>'
]
],
'endTime' => '<string>',
'includeCursor' => true,
'includeCursorField' => true,
'libraries' => [
'<string>'
],
'queryOptions' => [
'disableCache' => true,
'disableStats' => true,
'disableTrace' => true,
'maxDataPoints' => 123,
'maxSeries' => 123,
'noAggregation' => true,
'noFill' => true,
'noInterpolation' => true,
'resolution' => '<string>'
],
'startTime' => '<string>',
'variables' => [
]
],
'who' => '<string>',
'dataset' => '<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/v2/apl-starred-queries"
payload := strings.NewReader("{\n \"kind\": \"apl\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"query\": {\n \"apl\": \"<string>\",\n \"cursor\": \"<string>\",\n \"defaultLimit\": 123,\n \"defaultOrder\": [\n {\n \"desc\": true,\n \"field\": \"<string>\"\n }\n ],\n \"endTime\": \"<string>\",\n \"includeCursor\": true,\n \"includeCursorField\": true,\n \"libraries\": [\n \"<string>\"\n ],\n \"queryOptions\": {\n \"disableCache\": true,\n \"disableStats\": true,\n \"disableTrace\": true,\n \"maxDataPoints\": 123,\n \"maxSeries\": 123,\n \"noAggregation\": true,\n \"noFill\": true,\n \"noInterpolation\": true,\n \"resolution\": \"<string>\"\n },\n \"startTime\": \"<string>\",\n \"variables\": {}\n },\n \"who\": \"<string>\",\n \"dataset\": \"<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/v2/apl-starred-queries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"apl\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"query\": {\n \"apl\": \"<string>\",\n \"cursor\": \"<string>\",\n \"defaultLimit\": 123,\n \"defaultOrder\": [\n {\n \"desc\": true,\n \"field\": \"<string>\"\n }\n ],\n \"endTime\": \"<string>\",\n \"includeCursor\": true,\n \"includeCursorField\": true,\n \"libraries\": [\n \"<string>\"\n ],\n \"queryOptions\": {\n \"disableCache\": true,\n \"disableStats\": true,\n \"disableTrace\": true,\n \"maxDataPoints\": 123,\n \"maxSeries\": 123,\n \"noAggregation\": true,\n \"noFill\": true,\n \"noInterpolation\": true,\n \"resolution\": \"<string>\"\n },\n \"startTime\": \"<string>\",\n \"variables\": {}\n },\n \"who\": \"<string>\",\n \"dataset\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v2/apl-starred-queries")
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 \"kind\": \"apl\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"query\": {\n \"apl\": \"<string>\",\n \"cursor\": \"<string>\",\n \"defaultLimit\": 123,\n \"defaultOrder\": [\n {\n \"desc\": true,\n \"field\": \"<string>\"\n }\n ],\n \"endTime\": \"<string>\",\n \"includeCursor\": true,\n \"includeCursorField\": true,\n \"libraries\": [\n \"<string>\"\n ],\n \"queryOptions\": {\n \"disableCache\": true,\n \"disableStats\": true,\n \"disableTrace\": true,\n \"maxDataPoints\": 123,\n \"maxSeries\": 123,\n \"noAggregation\": true,\n \"noFill\": true,\n \"noInterpolation\": true,\n \"resolution\": \"<string>\"\n },\n \"startTime\": \"<string>\",\n \"variables\": {}\n },\n \"who\": \"<string>\",\n \"dataset\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"kind": "apl",
"metadata": {},
"name": "<string>",
"query": {
"apl": "<string>",
"cursor": "<string>",
"defaultLimit": 123,
"defaultOrder": [
{
"desc": true,
"field": "<string>"
}
],
"endTime": "<string>",
"includeCursor": true,
"includeCursorField": true,
"libraries": [
"<string>"
],
"queryOptions": {
"disableCache": true,
"disableStats": true,
"disableTrace": true,
"maxDataPoints": 123,
"maxSeries": 123,
"noAggregation": true,
"noFill": true,
"noInterpolation": true,
"resolution": "<string>"
},
"startTime": "<string>",
"variables": {}
},
"who": "<string>",
"id": "<string>",
"dataset": "<string>"
}Create saved query
POST
/
apl-starred-queries
cURL
curl --request POST \
--url https://api.axiom.co/v2/apl-starred-queries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "apl",
"metadata": {},
"name": "<string>",
"query": {
"apl": "<string>",
"cursor": "<string>",
"defaultLimit": 123,
"defaultOrder": [
{
"desc": true,
"field": "<string>"
}
],
"endTime": "<string>",
"includeCursor": true,
"includeCursorField": true,
"libraries": [
"<string>"
],
"queryOptions": {
"disableCache": true,
"disableStats": true,
"disableTrace": true,
"maxDataPoints": 123,
"maxSeries": 123,
"noAggregation": true,
"noFill": true,
"noInterpolation": true,
"resolution": "<string>"
},
"startTime": "<string>",
"variables": {}
},
"who": "<string>",
"dataset": "<string>"
}
'import requests
url = "https://api.axiom.co/v2/apl-starred-queries"
payload = {
"kind": "apl",
"metadata": {},
"name": "<string>",
"query": {
"apl": "<string>",
"cursor": "<string>",
"defaultLimit": 123,
"defaultOrder": [
{
"desc": True,
"field": "<string>"
}
],
"endTime": "<string>",
"includeCursor": True,
"includeCursorField": True,
"libraries": ["<string>"],
"queryOptions": {
"disableCache": True,
"disableStats": True,
"disableTrace": True,
"maxDataPoints": 123,
"maxSeries": 123,
"noAggregation": True,
"noFill": True,
"noInterpolation": True,
"resolution": "<string>"
},
"startTime": "<string>",
"variables": {}
},
"who": "<string>",
"dataset": "<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({
kind: 'apl',
metadata: {},
name: '<string>',
query: {
apl: '<string>',
cursor: '<string>',
defaultLimit: 123,
defaultOrder: [{desc: true, field: '<string>'}],
endTime: '<string>',
includeCursor: true,
includeCursorField: true,
libraries: ['<string>'],
queryOptions: {
disableCache: true,
disableStats: true,
disableTrace: true,
maxDataPoints: 123,
maxSeries: 123,
noAggregation: true,
noFill: true,
noInterpolation: true,
resolution: '<string>'
},
startTime: '<string>',
variables: {}
},
who: '<string>',
dataset: '<string>'
})
};
fetch('https://api.axiom.co/v2/apl-starred-queries', 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/v2/apl-starred-queries",
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([
'kind' => 'apl',
'metadata' => [
],
'name' => '<string>',
'query' => [
'apl' => '<string>',
'cursor' => '<string>',
'defaultLimit' => 123,
'defaultOrder' => [
[
'desc' => true,
'field' => '<string>'
]
],
'endTime' => '<string>',
'includeCursor' => true,
'includeCursorField' => true,
'libraries' => [
'<string>'
],
'queryOptions' => [
'disableCache' => true,
'disableStats' => true,
'disableTrace' => true,
'maxDataPoints' => 123,
'maxSeries' => 123,
'noAggregation' => true,
'noFill' => true,
'noInterpolation' => true,
'resolution' => '<string>'
],
'startTime' => '<string>',
'variables' => [
]
],
'who' => '<string>',
'dataset' => '<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/v2/apl-starred-queries"
payload := strings.NewReader("{\n \"kind\": \"apl\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"query\": {\n \"apl\": \"<string>\",\n \"cursor\": \"<string>\",\n \"defaultLimit\": 123,\n \"defaultOrder\": [\n {\n \"desc\": true,\n \"field\": \"<string>\"\n }\n ],\n \"endTime\": \"<string>\",\n \"includeCursor\": true,\n \"includeCursorField\": true,\n \"libraries\": [\n \"<string>\"\n ],\n \"queryOptions\": {\n \"disableCache\": true,\n \"disableStats\": true,\n \"disableTrace\": true,\n \"maxDataPoints\": 123,\n \"maxSeries\": 123,\n \"noAggregation\": true,\n \"noFill\": true,\n \"noInterpolation\": true,\n \"resolution\": \"<string>\"\n },\n \"startTime\": \"<string>\",\n \"variables\": {}\n },\n \"who\": \"<string>\",\n \"dataset\": \"<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/v2/apl-starred-queries")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"apl\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"query\": {\n \"apl\": \"<string>\",\n \"cursor\": \"<string>\",\n \"defaultLimit\": 123,\n \"defaultOrder\": [\n {\n \"desc\": true,\n \"field\": \"<string>\"\n }\n ],\n \"endTime\": \"<string>\",\n \"includeCursor\": true,\n \"includeCursorField\": true,\n \"libraries\": [\n \"<string>\"\n ],\n \"queryOptions\": {\n \"disableCache\": true,\n \"disableStats\": true,\n \"disableTrace\": true,\n \"maxDataPoints\": 123,\n \"maxSeries\": 123,\n \"noAggregation\": true,\n \"noFill\": true,\n \"noInterpolation\": true,\n \"resolution\": \"<string>\"\n },\n \"startTime\": \"<string>\",\n \"variables\": {}\n },\n \"who\": \"<string>\",\n \"dataset\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.axiom.co/v2/apl-starred-queries")
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 \"kind\": \"apl\",\n \"metadata\": {},\n \"name\": \"<string>\",\n \"query\": {\n \"apl\": \"<string>\",\n \"cursor\": \"<string>\",\n \"defaultLimit\": 123,\n \"defaultOrder\": [\n {\n \"desc\": true,\n \"field\": \"<string>\"\n }\n ],\n \"endTime\": \"<string>\",\n \"includeCursor\": true,\n \"includeCursorField\": true,\n \"libraries\": [\n \"<string>\"\n ],\n \"queryOptions\": {\n \"disableCache\": true,\n \"disableStats\": true,\n \"disableTrace\": true,\n \"maxDataPoints\": 123,\n \"maxSeries\": 123,\n \"noAggregation\": true,\n \"noFill\": true,\n \"noInterpolation\": true,\n \"resolution\": \"<string>\"\n },\n \"startTime\": \"<string>\",\n \"variables\": {}\n },\n \"who\": \"<string>\",\n \"dataset\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"kind": "apl",
"metadata": {},
"name": "<string>",
"query": {
"apl": "<string>",
"cursor": "<string>",
"defaultLimit": 123,
"defaultOrder": [
{
"desc": true,
"field": "<string>"
}
],
"endTime": "<string>",
"includeCursor": true,
"includeCursorField": true,
"libraries": [
"<string>"
],
"queryOptions": {
"disableCache": true,
"disableStats": true,
"disableTrace": true,
"maxDataPoints": 123,
"maxSeries": 123,
"noAggregation": true,
"noFill": true,
"noInterpolation": true,
"resolution": "<string>"
},
"startTime": "<string>",
"variables": {}
},
"who": "<string>",
"id": "<string>",
"dataset": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Was this page helpful?
⌘I