CI
Change AutoPilot for CI settings
Replaces the settings at one scope. A null field inherits from the wider scope. max_cores, allowed_os, allowed_arch and allow_gpu limit the runners AutoPilot may choose and can only narrow: the smallest max_cores, the overlap of the lists and allow_gpu false at any scope apply. A job whose default runner is outside them keeps its default.
PUT
/
api
/
v1
/
tenant
/
ci
/
autopilot
/
settings
Change AutoPilot for CI settings
curl --request PUT \
--url https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>' \
--data '
{
"allow_gpu": true,
"allowed_arch": [
"<string>"
],
"allowed_os": [
"<string>"
],
"allowed_providers": [
"<string>"
],
"enabled": true,
"max_cores": 2,
"paused_until": "<string>",
"release": true,
"repository": "baselinehq/backend",
"workflow_path": ".github/workflows/ci.yml"
}
'import requests
url = "https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings"
payload = {
"allow_gpu": True,
"allowed_arch": ["<string>"],
"allowed_os": ["<string>"],
"allowed_providers": ["<string>"],
"enabled": True,
"max_cores": 2,
"paused_until": "<string>",
"release": True,
"repository": "baselinehq/backend",
"workflow_path": ".github/workflows/ci.yml"
}
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
allow_gpu: true,
allowed_arch: ['<string>'],
allowed_os: ['<string>'],
allowed_providers: ['<string>'],
enabled: true,
max_cores: 2,
paused_until: '<string>',
release: true,
repository: 'baselinehq/backend',
workflow_path: '.github/workflows/ci.yml'
})
};
fetch('https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings', 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/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allow_gpu' => true,
'allowed_arch' => [
'<string>'
],
'allowed_os' => [
'<string>'
],
'allowed_providers' => [
'<string>'
],
'enabled' => true,
'max_cores' => 2,
'paused_until' => '<string>',
'release' => true,
'repository' => 'baselinehq/backend',
'workflow_path' => '.github/workflows/ci.yml'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings"
payload := strings.NewReader("{\n \"allow_gpu\": true,\n \"allowed_arch\": [\n \"<string>\"\n ],\n \"allowed_os\": [\n \"<string>\"\n ],\n \"allowed_providers\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"max_cores\": 2,\n \"paused_until\": \"<string>\",\n \"release\": true,\n \"repository\": \"baselinehq/backend\",\n \"workflow_path\": \".github/workflows/ci.yml\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<api-key>")
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.put("https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allow_gpu\": true,\n \"allowed_arch\": [\n \"<string>\"\n ],\n \"allowed_os\": [\n \"<string>\"\n ],\n \"allowed_providers\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"max_cores\": 2,\n \"paused_until\": \"<string>\",\n \"release\": true,\n \"repository\": \"baselinehq/backend\",\n \"workflow_path\": \".github/workflows/ci.yml\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allow_gpu\": true,\n \"allowed_arch\": [\n \"<string>\"\n ],\n \"allowed_os\": [\n \"<string>\"\n ],\n \"allowed_providers\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"max_cores\": 2,\n \"paused_until\": \"<string>\",\n \"release\": true,\n \"repository\": \"baselinehq/backend\",\n \"workflow_path\": \".github/workflows/ci.yml\"\n}"
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"effective": {
"allow_gpu": true,
"allowed_arch": [
"<string>"
],
"allowed_os": [
"<string>"
],
"allowed_providers": [
"<string>"
],
"enabled": true,
"max_cores": 123,
"paused_until": "<string>",
"policy": "cheapest",
"release": true
},
"inherited_from": {},
"own": {
"allow_gpu": true,
"allowed_arch": [
"<string>"
],
"allowed_os": [
"<string>"
],
"allowed_providers": [
"<string>"
],
"enabled": true,
"max_cores": 123,
"paused_until": "<string>",
"policy": "cheapest",
"release": true
},
"repository": "<string>",
"workflow_path": "<string>"
}
}{
"message": "some message",
"status": "error"
}Authorizations
Enter "Bearer {token}"
Headers
Tenant ID
Body
application/json
Scope and settings
Required range:
x >= 1Available options:
cheapest, balanced, fastest Example:
"baselinehq/backend"
Example:
".github/workflows/ci.yml"
Was this page helpful?
⌘I
Change AutoPilot for CI settings
curl --request PUT \
--url https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'X-CostGraph-Tenant-ID: <x-costgraph-tenant-id>' \
--data '
{
"allow_gpu": true,
"allowed_arch": [
"<string>"
],
"allowed_os": [
"<string>"
],
"allowed_providers": [
"<string>"
],
"enabled": true,
"max_cores": 2,
"paused_until": "<string>",
"release": true,
"repository": "baselinehq/backend",
"workflow_path": ".github/workflows/ci.yml"
}
'import requests
url = "https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings"
payload = {
"allow_gpu": True,
"allowed_arch": ["<string>"],
"allowed_os": ["<string>"],
"allowed_providers": ["<string>"],
"enabled": True,
"max_cores": 2,
"paused_until": "<string>",
"release": True,
"repository": "baselinehq/backend",
"workflow_path": ".github/workflows/ci.yml"
}
headers = {
"X-CostGraph-Tenant-ID": "<x-costgraph-tenant-id>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-CostGraph-Tenant-ID': '<x-costgraph-tenant-id>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
allow_gpu: true,
allowed_arch: ['<string>'],
allowed_os: ['<string>'],
allowed_providers: ['<string>'],
enabled: true,
max_cores: 2,
paused_until: '<string>',
release: true,
repository: 'baselinehq/backend',
workflow_path: '.github/workflows/ci.yml'
})
};
fetch('https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings', 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/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allow_gpu' => true,
'allowed_arch' => [
'<string>'
],
'allowed_os' => [
'<string>'
],
'allowed_providers' => [
'<string>'
],
'enabled' => true,
'max_cores' => 2,
'paused_until' => '<string>',
'release' => true,
'repository' => 'baselinehq/backend',
'workflow_path' => '.github/workflows/ci.yml'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings"
payload := strings.NewReader("{\n \"allow_gpu\": true,\n \"allowed_arch\": [\n \"<string>\"\n ],\n \"allowed_os\": [\n \"<string>\"\n ],\n \"allowed_providers\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"max_cores\": 2,\n \"paused_until\": \"<string>\",\n \"release\": true,\n \"repository\": \"baselinehq/backend\",\n \"workflow_path\": \".github/workflows/ci.yml\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
req.Header.Add("Authorization", "<api-key>")
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.put("https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings")
.header("X-CostGraph-Tenant-ID", "<x-costgraph-tenant-id>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"allow_gpu\": true,\n \"allowed_arch\": [\n \"<string>\"\n ],\n \"allowed_os\": [\n \"<string>\"\n ],\n \"allowed_providers\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"max_cores\": 2,\n \"paused_until\": \"<string>\",\n \"release\": true,\n \"repository\": \"baselinehq/backend\",\n \"workflow_path\": \".github/workflows/ci.yml\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/ci/autopilot/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-CostGraph-Tenant-ID"] = '<x-costgraph-tenant-id>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allow_gpu\": true,\n \"allowed_arch\": [\n \"<string>\"\n ],\n \"allowed_os\": [\n \"<string>\"\n ],\n \"allowed_providers\": [\n \"<string>\"\n ],\n \"enabled\": true,\n \"max_cores\": 2,\n \"paused_until\": \"<string>\",\n \"release\": true,\n \"repository\": \"baselinehq/backend\",\n \"workflow_path\": \".github/workflows/ci.yml\"\n}"
response = http.request(request)
puts response.read_body{
"message": "some message",
"status": "success",
"data": {
"effective": {
"allow_gpu": true,
"allowed_arch": [
"<string>"
],
"allowed_os": [
"<string>"
],
"allowed_providers": [
"<string>"
],
"enabled": true,
"max_cores": 123,
"paused_until": "<string>",
"policy": "cheapest",
"release": true
},
"inherited_from": {},
"own": {
"allow_gpu": true,
"allowed_arch": [
"<string>"
],
"allowed_os": [
"<string>"
],
"allowed_providers": [
"<string>"
],
"enabled": true,
"max_cores": 123,
"paused_until": "<string>",
"policy": "cheapest",
"release": true
},
"repository": "<string>",
"workflow_path": "<string>"
}
}{
"message": "some message",
"status": "error"
}