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>"
}
]
}Assign a project to a billing warm slot
Binds a project, at a pool-eligible VM size, to the org’s warm slot at slotIndex and returns the slot, provisioning while the project’s warm machines are built; a slot the auto-fill gave the project at another index is freed. Without if_unassigned it 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. Only an org owner, admin or billing manager may call it. Refused (422) for a path or body the schema refuses, such as a VM size that is not one, (400) for a project without a linked GitHub repository or a VM size warm slots cannot pool, (403 org_role_insufficient) for any other role, (403) for an index past the tier’s slot count, (404) for a project the org does not hold, 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.
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>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The slot's place in the org's grid, from 0.
0 <= x <= 2147483647Body
small, medium, large Claim the slot only when it holds no project, an auto-assigned project, or this project at this VM size; any other pin is refused with 409 warm_slot_occupied instead of being evicted or resized.
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.