AutoPilot for CI routing history
One row per job AutoPilot for CI made a decision for, newest first, over the last 90 days: the workflow run (with a link to it on GitHub), the default and the chosen runner, why, the policy and whether it was set in the workflow file, and the candidates it compared. Once the job has run and been measured (settled), saved and added compare it with its baseline the same way as the savings totals; they are null for a job left on its default runner, one not measured yet, or one with no baseline.
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs \
--header 'Authorization: <api-key>' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs"
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs', 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.costgraph.ai/api/v1/tenant/ci/autopilot/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>"
],
]);
$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.costgraph.ai/api/v1/tenant/ci/autopilot/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<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.costgraph.ai/api/v1/tenant/ci/autopilot/runs")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"items": [
{
"baseline_estimated": true,
"cancelled": true,
"candidates": [
{
"eligible": true,
"label": "<string>",
"measured": true,
"provider": "<string>",
"reason": "<string>",
"cost_usd": 123,
"wall_seconds": 123
}
],
"decided_at": "<string>",
"decision_id": "<string>",
"default_runner": "<string>",
"event": "<string>",
"git_keys": [
"<string>"
],
"job": "<string>",
"policy": "cheapest",
"provider": "<string>",
"reason": "<string>",
"repository": "<string>",
"run_attempt": 123,
"run_id": 123,
"run_url": "<string>",
"runner": "<string>",
"settled": true,
"source": "settings",
"watch_state": "",
"workflow": "<string>",
"workflow_path": "<string>",
"actual_cost_usd": 123,
"added_usd": 123,
"added_wall_seconds": 123,
"default_cost_usd": 123,
"estimated_cost_usd": 123,
"pull_request": 123,
"saved_usd": 123,
"saved_wall_seconds": 123
}
],
"limit": 123,
"offset": 123,
"total_count": 123
}
}{
"message": "some message",
"status": "error"
}Authorizations
Enter "Bearer {token}"
Headers
Tenant ID
Query Parameters
owner/name
Workflow file; needs repository
Pull request number; needs repository
Only jobs routed to this runner provider
Number of rows to return (default 50, max 200)
Rows to skip before returning results (default 0)
Was this page helpful?
curl --request GET \
--url https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs \
--header 'Authorization: <api-key>' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>'import requests
url = "https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs"
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>', Authorization: '<api-key>'}
};
fetch('https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs', 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.costgraph.ai/api/v1/tenant/ci/autopilot/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>"
],
]);
$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.costgraph.ai/api/v1/tenant/ci/autopilot/runs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<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.costgraph.ai/api/v1/tenant/ci/autopilot/runs")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/ci/autopilot/runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"items": [
{
"baseline_estimated": true,
"cancelled": true,
"candidates": [
{
"eligible": true,
"label": "<string>",
"measured": true,
"provider": "<string>",
"reason": "<string>",
"cost_usd": 123,
"wall_seconds": 123
}
],
"decided_at": "<string>",
"decision_id": "<string>",
"default_runner": "<string>",
"event": "<string>",
"git_keys": [
"<string>"
],
"job": "<string>",
"policy": "cheapest",
"provider": "<string>",
"reason": "<string>",
"repository": "<string>",
"run_attempt": 123,
"run_id": 123,
"run_url": "<string>",
"runner": "<string>",
"settled": true,
"source": "settings",
"watch_state": "",
"workflow": "<string>",
"workflow_path": "<string>",
"actual_cost_usd": 123,
"added_usd": 123,
"added_wall_seconds": 123,
"default_cost_usd": 123,
"estimated_cost_usd": 123,
"pull_request": 123,
"saved_usd": 123,
"saved_wall_seconds": 123
}
],
"limit": 123,
"offset": 123,
"total_count": 123
}
}{
"message": "some message",
"status": "error"
}