curl --request GET \
--url https://api.outerlayer.ai/v1/work-items/{workItemId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/work-items/{workItemId}"
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/work-items/{workItemId}', 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}",
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/work-items/{workItemId}"
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/work-items/{workItemId}")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{workItemId}")
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": {
"checks": [
{
"body": "<string>",
"id": "<string>",
"items": [
{
"id": "<string>",
"result": "pass",
"criterion": "<string>",
"inputs": "<string>",
"reason": "<string>",
"refs": [
{
"path": "<string>",
"href": "<string>",
"line": 1
}
]
}
],
"link": "<string>",
"name": "<string>",
"provenance": "ci",
"recordedAt": "<string>",
"recordedBy": "<string>",
"result": "pass",
"source": "machine"
}
],
"criteria": {
"drafted": true,
"items": [
{
"id": "<string>",
"proof": "<string>",
"text": "<string>"
}
],
"recordedAt": "<string>",
"recordedBy": "<string>"
},
"host": {
"host": "<string>",
"state": "taking-work",
"status": "ok",
"blocked": {
"reason": "<string>"
},
"cliVersion": "<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
},
"pollSeconds": 123,
"runnerProtocol": 123,
"slotsTotal": 123,
"slotsUsed": 123,
"takes": {
"queues": [
"<string>"
],
"repos": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"truncated": true
},
"waitingItems": [
123
]
},
"issue": {
"author": "<string>",
"body": "<string>",
"labels": [
"<string>"
],
"openedAt": "<string>",
"state": "open",
"syncStatus": "ok",
"syncedAt": "<string>",
"url": "<string>"
},
"pullRequests": [
{
"conflict": {
"baseBranch": "<string>",
"detectedAt": "<string>",
"headSha": "<string>"
},
"method": "<string>",
"prNumber": 123,
"repository": "<string>",
"repositoryConnected": true
}
],
"repositoryDisconnected": true,
"waiting": {
"reason": "trigger-used"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Read one work item
The stage, section, gate ledger (with the attestation ids behind each gate), evaluation (the newest evidence verdict, its sentence, when it was recorded, and each row that failed or has no result yet; null before the first evaluation), linked pull requests and sessions (each with claimId, the host attempt it ran in, or null for a session linked any other way), every addition (live or removed) recorded against this item, buildRequests (every build request, used or not, each with the instructions its requester gave the agent or null), the live claim — with holderKind (host or session) and, for a session lease, sessionId — and claims, every lease this item has ever had with its id (the attempt’s name, which GET /v1/work-items/{workItemId}/claims/{claimId}/log takes), its holder kind, buildRequestId (the id of the build request it answers), session id for a session lease, its outcome, the step it ended in (stage), the exit code of the process that ended it (exitCode), a host-written reason, and environment (what the attempt ran in: its isolation, the recipe and image, the hosts it reached and the ranges refused, the names of the variables it was given, the names of the destinations it called, the kinds of repository token it used, commitIdentity (whether its commits were authored by the App or the host, and whether the requester was credited) and controlPlane (the control-plane repository and commit a governed build received its instructions from; null for a self-governed build); null for a lease that recorded none). Both the live claim and every past lease also carry apiKeyName (the key that took it) and requestedByKind/requestedByName (who asked for the build it answers — a member or a key, resolved once when the lease was written); no membership or key id is ever included. criteria is the item’s current recorded acceptance criteria — drafted (the build wrote them from the issue description), recordedAt, recordedBy and items of id, text and proof — or null when none are recorded. checks is every check open on the item, the latest row per name, each with its result, sentence, link and items, its check items (one per thing the check judged, with its own result and reason; null when the recorder sent none). issue is the issue the item wraps, as the dashboard last copied it from its tracker: its url, state, Markdown body, author, openedAt and labels, with syncedAt and syncStatus saying how current the copy is. It is how a build reads a Linear or Jira issue it holds no credential for.
curl --request GET \
--url https://api.outerlayer.ai/v1/work-items/{workItemId} \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/work-items/{workItemId}"
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/work-items/{workItemId}', 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}",
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/work-items/{workItemId}"
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/work-items/{workItemId}")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{workItemId}")
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": {
"checks": [
{
"body": "<string>",
"id": "<string>",
"items": [
{
"id": "<string>",
"result": "pass",
"criterion": "<string>",
"inputs": "<string>",
"reason": "<string>",
"refs": [
{
"path": "<string>",
"href": "<string>",
"line": 1
}
]
}
],
"link": "<string>",
"name": "<string>",
"provenance": "ci",
"recordedAt": "<string>",
"recordedBy": "<string>",
"result": "pass",
"source": "machine"
}
],
"criteria": {
"drafted": true,
"items": [
{
"id": "<string>",
"proof": "<string>",
"text": "<string>"
}
],
"recordedAt": "<string>",
"recordedBy": "<string>"
},
"host": {
"host": "<string>",
"state": "taking-work",
"status": "ok",
"blocked": {
"reason": "<string>"
},
"cliVersion": "<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
},
"pollSeconds": 123,
"runnerProtocol": 123,
"slotsTotal": 123,
"slotsUsed": 123,
"takes": {
"queues": [
"<string>"
],
"repos": {
"exclude": [
"<string>"
],
"include": [
"<string>"
]
},
"truncated": true
},
"waitingItems": [
123
]
},
"issue": {
"author": "<string>",
"body": "<string>",
"labels": [
"<string>"
],
"openedAt": "<string>",
"state": "open",
"syncStatus": "ok",
"syncedAt": "<string>",
"url": "<string>"
},
"pullRequests": [
{
"conflict": {
"baseBranch": "<string>",
"detectedAt": "<string>",
"headSha": "<string>"
},
"method": "<string>",
"prNumber": 123,
"repository": "<string>",
"repositoryConnected": true
}
],
"repositoryDisconnected": true,
"waiting": {
"reason": "trigger-used"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}