Get Continuous Queries
curl --request GET \
--url https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query \
--header 'X-Management-Key: <api-key>'import requests
url = "https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query"
headers = {"X-Management-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Management-Key': '<api-key>'}};
fetch('https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query', 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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Management-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Management-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query")
.header("X-Management-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Management-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"export_preferences": {
"data_events": {
"enabled": true
}
},
"id": "d25f4472-c679-4e7a-9442-2bce8c12afb1",
"query": {
"group_by": [
{
"arg": {
"index": "sleep"
},
"date_trunc": {
"unit": "month",
"value": 1
}
}
],
"select": [
{
"group_key": "*"
},
{
"arg": {
"value_macro": "sleep_score",
"version": "automatic"
},
"func": "mean"
}
]
},
"query_config": {
"provider_priority_overrides": [
"oura"
]
},
"resource_dependencies": [
"sleep"
],
"result_table_schema": {
"group_key.0": "string",
"sleep_score": "int64"
},
"scheduling_preferences": {
"minimum_gap_duration_second": 3600
},
"slug": "weekly_mean_sleep_score",
"title": "Weekly Mean Sleep Score"
}
],
"next_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Junction Management API
List all Continuous Queries
Get org team continuous queries via the Junction API. Requires authentication with your team API key.
GET
/
v1
/
org
/
{org_id}
/
team
/
{team_id}
/
{environment}
/
continuous_query
Get Continuous Queries
curl --request GET \
--url https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query \
--header 'X-Management-Key: <api-key>'import requests
url = "https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query"
headers = {"X-Management-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Management-Key': '<api-key>'}};
fetch('https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query', 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.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Management-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Management-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query")
.header("X-Management-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/{environment}/continuous_query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Management-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"export_preferences": {
"data_events": {
"enabled": true
}
},
"id": "d25f4472-c679-4e7a-9442-2bce8c12afb1",
"query": {
"group_by": [
{
"arg": {
"index": "sleep"
},
"date_trunc": {
"unit": "month",
"value": 1
}
}
],
"select": [
{
"group_key": "*"
},
{
"arg": {
"value_macro": "sleep_score",
"version": "automatic"
},
"func": "mean"
}
]
},
"query_config": {
"provider_priority_overrides": [
"oura"
]
},
"resource_dependencies": [
"sleep"
],
"result_table_schema": {
"group_key.0": "string",
"sleep_score": "int64"
},
"scheduling_preferences": {
"minimum_gap_duration_second": 3600
},
"slug": "weekly_mean_sleep_score",
"title": "Weekly Mean Sleep Score"
}
],
"next_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Junction Sense is in closed beta.Interested in Junction Sense? Get in touch with your Customer Success Manager.
Junction Management API is available for the Scale plan.
The base URL of this endpoint is
https://api.management.junction.com/.The endpoint accepts only Management Key (X-Management-Key).
Team API Key is not accepted.Authorizations
Path Parameters
Available options:
production, sandbox Was this page helpful?
⌘I