Assign a project to a billing warm slot
curl --request PUT \
--url https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"if_unassigned": true
}
'import requests
url = "https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}"
payload = {
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"if_unassigned": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', if_unassigned: true})
};
fetch('https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}', 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.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}",
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([
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'if_unassigned' => true
]),
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.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}"
payload := strings.NewReader("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"if_unassigned\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"if_unassigned\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"if_unassigned\": true\n}"
response = http.request(request)
puts response.read_body{
"slot_index": 1073741823,
"status": "unassigned"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "warm_slot_occupied",
"error": "<string>"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Billing
Assign a project to a billing warm slot
Pins a project, at a VM size, to the org's warm slot at slotIndex and returns the slot, provisioning while the project's warm machines are built.
Use this tool when you need to:
- Keep a project's machines warm so its tasks start without waiting for a build
- Move a warm slot to another project or another VM size
- Claim a free slot without evicting another pin (if_unassigned)
Examples:
- PUT /orgs/{orgID}/billing/slots/0 {"project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "vm_size": "medium"}
- PUT /orgs/{orgID}/billing/slots/1 {"project_id": "6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21", "vm_size": "medium", "if_unassigned": true}
Hints:
- orgID is the org's uuid and slotIndex the slot's index, an integer from 0 to 2147483647. project_id (a uuid) and vm_size (medium, large or xl) are required, if_unassigned is optional and defaults to false; the schema answers 422 for a path or body out of that shape, an unknown field included.
- Without if_unassigned the pin replaces whatever project held the slot; with it, the slot is taken only when it holds no project, an auto-assigned project, or this project at this VM size. Either way the slot becomes a manual pin, an auto-assigned slot of the same project at another index is freed, and the project's warm build is queued again, so assigning again retries a failed seed.
- Answers 200 with the BillingWarmSlot, status provisioning and assignment_kind manual; listBillingWarmSlots shows its live status.
- Refused with 404 for a project the org does not hold or that is archived, 400 for a project without a linked GitHub repository, 403 with code forbidden for a slotIndex at or past the org's warm_slot_limit, and 409 warm_slot_occupied, with if_unassigned, when the slot holds another project's pin or this project's pin at another VM size. The handler's 400 for a VM size warm slots cannot pool answers no size the schema admits: medium, large and xl are all pool-eligible.
- Use releaseBillingWarmSlot instead to empty a slot, and getBillingSubscription for warm_slot_limit.
- Owners, admins and billing members only, with a session or a platform API key: a member or viewer is refused with 403 org_role_insufficient before the path or body is validated, a non-member with 403 org_membership_required, an orgID that is not a uuid with 400, and an agent host's grant with 403 agent_host_route_not_allowed.
PUT
/
orgs
/
{orgID}
/
billing
/
slots
/
{slotIndex}
Assign a project to a billing warm slot
curl --request PUT \
--url https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"if_unassigned": true
}
'import requests
url = "https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}"
payload = {
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"if_unassigned": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', if_unassigned: true})
};
fetch('https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}', 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.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}",
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([
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'if_unassigned' => true
]),
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.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}"
payload := strings.NewReader("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"if_unassigned\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"if_unassigned\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/billing/slots/{slotIndex}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"if_unassigned\": true\n}"
response = http.request(request)
puts response.read_body{
"slot_index": 1073741823,
"status": "unassigned"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "warm_slot_occupied",
"error": "<string>"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Path Parameters
Body
application/json
Response
OK
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
One slot of the org's warm slot grid: unassigned, or held by a project and in the status that project's warm machines are in.