curl --request POST \
--url https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"host": "<string>",
"exitCode": -1,
"reason": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release"
payload = {
"host": "<string>",
"exitCode": -1,
"reason": "<string>"
}
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Outerlayer-App-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({host: '<string>', exitCode: -1, reason: '<string>'})
};
fetch('https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release', 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/work-items/{workItemId}/claim/release",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'host' => '<string>',
'exitCode' => -1,
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release"
payload := strings.NewReader("{\n \"host\": \"<string>\",\n \"exitCode\": -1,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
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.post("https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"<string>\",\n \"exitCode\": -1,\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"host\": \"<string>\",\n \"exitCode\": -1,\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"exitCode": 123,
"id": "<string>",
"outcome": "ok",
"reason": "<string>",
"releasedAt": "<string>",
"stage": "provision"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Release a host's claim on a work item
Marks the caller’s own lease released, optionally with an outcome, the stage the attempt ended in, its exitCode, a one-line reason (at most 200 characters, no line break), and an environment recording what the attempt ran in: its isolation (container, vm or shared-user), the recipe and image, up to 200 hosts reached and the refusals with their ranges, the names, never the values, of the variables passed in, the names of up to 20 destinations the build called, never an address or a secret, and the kinds of repository token the build used (credentials, read and push). incomplete is a command that exited 0 while the item’s checks still failed or had no result; like ok, it uses up the build request. It is stored with the release and returned on GET /v1/work-items/{workItemId}. Releasing an already-released lease is a no-op that returns the stored values and stores nothing new. claim_not_held (403) when the calling key is not the holder of the item’s newest lease, live or not. The holder is the key that took the lease; host is a label the request carries and decides nothing.
curl --request POST \
--url https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"host": "<string>",
"exitCode": -1,
"reason": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release"
payload = {
"host": "<string>",
"exitCode": -1,
"reason": "<string>"
}
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Outerlayer-App-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({host: '<string>', exitCode: -1, reason: '<string>'})
};
fetch('https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release', 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/work-items/{workItemId}/claim/release",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'host' => '<string>',
'exitCode' => -1,
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release"
payload := strings.NewReader("{\n \"host\": \"<string>\",\n \"exitCode\": -1,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
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.post("https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"host\": \"<string>\",\n \"exitCode\": -1,\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{workItemId}/claim/release")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"host\": \"<string>\",\n \"exitCode\": -1,\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"exitCode": 123,
"id": "<string>",
"outcome": "ok",
"reason": "<string>",
"releasedAt": "<string>",
"stage": "provision"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Factory id the request is scoped to.
API key (sk_outerlayer_*)
Headers
HTTP Message Signature (RFC 9421) made with the runner key's host key: runner=:<base64>:.
The signature's covered components and parameters: runner=("@method" "@path" "@query" "content-digest");created=<unix seconds>;nonce="<random>";keyid="<host key fingerprint>";alg="ed25519".
RFC 9530 digest of the request body, always sent, including for a request with none: sha-256=:<base64>:.
Path Parameters
Body
1 - 255Show child attributes
Show child attributes
-2147483648 <= x <= 2147483647ok, incomplete, failed, timed_out, idle, lease_lost, interrupted, stopped 200provision, command, sync, cleanup, report Response
The lease is released (now, or already).
Show child attributes
Show child attributes