curl --request GET \
--url https://api.outerlayer.ai/v1/hosts \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/hosts"
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Outerlayer-App-Id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.outerlayer.ai/v1/hosts', 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.outerlayer.ai/v1/hosts",
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: Bearer <token>",
"X-Outerlayer-App-Id: <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.outerlayer.ai/v1/hosts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.outerlayer.ai/v1/hosts")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/hosts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"blocked": {
"reason": "<string>"
},
"cliVersion": "<string>",
"deliversComments": true,
"host": "<string>",
"lastError": {
"at": "<string>",
"code": "<string>",
"message": "<string>"
},
"lastHeartbeatAt": "<string>",
"lastSuccessAt": "<string>",
"lastUpdate": {
"at": "<string>",
"from": "<string>",
"outcome": "updated",
"reason": "<string>",
"to": "<string>"
},
"lowDisk": {
"free": 123,
"needed": 123
},
"owner": {
"membershipId": "<string>",
"name": "<string>"
},
"pollSeconds": 123,
"runnerProtocol": 123,
"selfUpdate": {
"reason": "runner-image",
"state": "yes"
},
"slotsTotal": 123,
"slotsUsed": 123,
"state": "taking-work",
"status": "ok",
"storedVariables": {
"approvedAt": "<string>",
"approvedBy": "<string>",
"approverIsMember": true,
"fingerprint": "<string>",
"finishedBuilds": 123,
"firstSeenAt": "<string>",
"keyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastHandedAt": "<string>",
"requestedAt": "<string>",
"state": "requested"
},
"support": {
"lowestVersion": "<string>",
"named": "<string>",
"state": "current",
"unsupportedOn": "<string>"
},
"takes": {
"queues": [
"<string>"
],
"repos": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"truncated": true,
"agents": [
"<string>"
],
"runs": true
},
"waitingItems": [
123
]
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}List the factory's runner hosts
Every host that has sent at least one heartbeat, ordered by host name. Each carries the CLI version, the runner protocol and slots it last reported, its last heartbeat time, its last successful request for work, its last error, its last self-update (the versions it moved between, how it ended, and why when it did not succeed; null until it reports one), its low-disk state (lowDisk: the free bytes and the bytes it needs, set while the host holds off new work for want of disk and null otherwise), whether it is taking work (blocked: the reason, set while the host claims nothing because it cannot run the work it would be given, and null otherwise), what it said it is doing (state: taking-work, draining, restarting, holding-for-update, blocked or low-disk; null for a runner older than protocol 21), the items a draining host waits on (waitingItems), what it takes (takes: the queues and the repository include and exclude patterns; null for a runner older than protocol 21, which counts as taking everything), whether the builds it starts receive a member’s comments while they run (deliversComments; null when the runner did not say), whether it updates itself (selfUpdate: yes, no with a reason, or unknown for a heartbeat that carries no field), where it stands against the support window (support: its state, the lowest version that may claim, the version the gateway names to it, and the date a behind runner is refused), its request for the factory’s build variables or its approval (storedVariables: the runner key’s id, the fingerprint of the key’s machine, who confirmed and when, when the runner last received variables, when it was first seen and how many builds it finished; null for a runner with neither, and for a personal runner), whose runner it is (owner: the member and their name for a personal runner, which builds only that member’s work; null for a shared runner), and a status derived at read time — never stored — from those timestamps: stale when the last heartbeat is older than three times the host’s own pollSeconds; otherwise draining when the last heartbeat said it is draining; otherwise outdated when the last heartbeat carried a runner protocol below the gateway’s minimum, or the runner’s version is below the lowest version that may claim; otherwise failing when the last request for work failed and no later success cleared it; otherwise ok. Unpaginated.
curl --request GET \
--url https://api.outerlayer.ai/v1/hosts \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/hosts"
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Outerlayer-App-Id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.outerlayer.ai/v1/hosts', 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.outerlayer.ai/v1/hosts",
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: Bearer <token>",
"X-Outerlayer-App-Id: <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.outerlayer.ai/v1/hosts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.outerlayer.ai/v1/hosts")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/hosts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"blocked": {
"reason": "<string>"
},
"cliVersion": "<string>",
"deliversComments": true,
"host": "<string>",
"lastError": {
"at": "<string>",
"code": "<string>",
"message": "<string>"
},
"lastHeartbeatAt": "<string>",
"lastSuccessAt": "<string>",
"lastUpdate": {
"at": "<string>",
"from": "<string>",
"outcome": "updated",
"reason": "<string>",
"to": "<string>"
},
"lowDisk": {
"free": 123,
"needed": 123
},
"owner": {
"membershipId": "<string>",
"name": "<string>"
},
"pollSeconds": 123,
"runnerProtocol": 123,
"selfUpdate": {
"reason": "runner-image",
"state": "yes"
},
"slotsTotal": 123,
"slotsUsed": 123,
"state": "taking-work",
"status": "ok",
"storedVariables": {
"approvedAt": "<string>",
"approvedBy": "<string>",
"approverIsMember": true,
"fingerprint": "<string>",
"finishedBuilds": 123,
"firstSeenAt": "<string>",
"keyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lastHandedAt": "<string>",
"requestedAt": "<string>",
"state": "requested"
},
"support": {
"lowestVersion": "<string>",
"named": "<string>",
"state": "current",
"unsupportedOn": "<string>"
},
"takes": {
"queues": [
"<string>"
],
"repos": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"truncated": true,
"agents": [
"<string>"
],
"runs": true
},
"waitingItems": [
123
]
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}