curl --request POST \
--url https://api.outerlayer.ai/v1/emitted-results \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"emit": {
"clientEmitId": "<string>",
"emittedAt": "<string>",
"item": {
"number": 1
},
"name": "<string>",
"body": "<string>",
"items": [
{
"id": "<string>",
"commit": "<string>",
"criterion": "<string>",
"inputs": "<string>",
"reason": "<string>",
"refs": [
{
"path": "<string>",
"changed": true,
"href": "<string>",
"inDiff": true,
"line": 1
}
]
}
],
"link": "<string>"
},
"schemaVersion": 1
}
'import requests
url = "https://api.outerlayer.ai/v1/emitted-results"
payload = {
"emit": {
"clientEmitId": "<string>",
"emittedAt": "<string>",
"item": { "number": 1 },
"name": "<string>",
"body": "<string>",
"items": [
{
"id": "<string>",
"commit": "<string>",
"criterion": "<string>",
"inputs": "<string>",
"reason": "<string>",
"refs": [
{
"path": "<string>",
"changed": True,
"href": "<string>",
"inDiff": True,
"line": 1
}
]
}
],
"link": "<string>"
},
"schemaVersion": 1
}
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({
emit: {
clientEmitId: '<string>',
emittedAt: '<string>',
item: {number: 1},
name: '<string>',
body: JSON.stringify('<string>'),
items: [
{
id: '<string>',
commit: '<string>',
criterion: '<string>',
inputs: '<string>',
reason: '<string>',
refs: [{path: '<string>', changed: true, href: '<string>', inDiff: true, line: 1}]
}
],
link: '<string>'
},
schemaVersion: 1
})
};
fetch('https://api.outerlayer.ai/v1/emitted-results', 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/emitted-results",
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([
'emit' => [
'clientEmitId' => '<string>',
'emittedAt' => '<string>',
'item' => [
'number' => 1
],
'name' => '<string>',
'body' => '<string>',
'items' => [
[
'id' => '<string>',
'commit' => '<string>',
'criterion' => '<string>',
'inputs' => '<string>',
'reason' => '<string>',
'refs' => [
[
'path' => '<string>',
'changed' => true,
'href' => '<string>',
'inDiff' => true,
'line' => 1
]
]
]
],
'link' => '<string>'
],
'schemaVersion' => 1
]),
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/emitted-results"
payload := strings.NewReader("{\n \"emit\": {\n \"clientEmitId\": \"<string>\",\n \"emittedAt\": \"<string>\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"body\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"commit\": \"<string>\",\n \"criterion\": \"<string>\",\n \"inputs\": \"<string>\",\n \"reason\": \"<string>\",\n \"refs\": [\n {\n \"path\": \"<string>\",\n \"changed\": true,\n \"href\": \"<string>\",\n \"inDiff\": true,\n \"line\": 1\n }\n ]\n }\n ],\n \"link\": \"<string>\"\n },\n \"schemaVersion\": 1\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/emitted-results")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emit\": {\n \"clientEmitId\": \"<string>\",\n \"emittedAt\": \"<string>\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"body\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"commit\": \"<string>\",\n \"criterion\": \"<string>\",\n \"inputs\": \"<string>\",\n \"reason\": \"<string>\",\n \"refs\": [\n {\n \"path\": \"<string>\",\n \"changed\": true,\n \"href\": \"<string>\",\n \"inDiff\": true,\n \"line\": 1\n }\n ]\n }\n ],\n \"link\": \"<string>\"\n },\n \"schemaVersion\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/emitted-results")
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 \"emit\": {\n \"clientEmitId\": \"<string>\",\n \"emittedAt\": \"<string>\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"body\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"commit\": \"<string>\",\n \"criterion\": \"<string>\",\n \"inputs\": \"<string>\",\n \"reason\": \"<string>\",\n \"refs\": [\n {\n \"path\": \"<string>\",\n \"changed\": true,\n \"href\": \"<string>\",\n \"inDiff\": true,\n \"line\": 1\n }\n ]\n }\n ],\n \"link\": \"<string>\"\n },\n \"schemaVersion\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"body": "<string>",
"created": true,
"id": "<string>",
"name": "<string>",
"provenance": "ci",
"recordedAt": "<string>",
"recordedBy": "<string>",
"result": "pass",
"source": "machine",
"workItemId": "<string>"
}
}{
"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>"
}
}Record the result of a judge or a code review
Accepts one emitted result: one pass, fail or inconclusive that a runner records for a judge or a code review that it ran, under the name the result is read by. A result can carry a link to its report and one sentence. A failing or inconclusive result needs one of the two. An inconclusive result means the judge could not decide; a member decides it. The result anchors to the work item that emit.item.number names. Only a runner records a result: a runner key that holds the work item’s live claim, stored with source host and the host’s name, or an item key, stored with source host for a review lease and machine for a build lease. Every other caller is refused. The source is derived from the credential and cannot be supplied by the caller. A result may carry judge items (items), one per thing the judge judged (a criterion, a file, a test), each with its own result and reason; a pass with a failing judge item is refused. Retrying with the same clientEmitId returns the already-stored result; reusing one for a different result is refused.
curl --request POST \
--url https://api.outerlayer.ai/v1/emitted-results \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"emit": {
"clientEmitId": "<string>",
"emittedAt": "<string>",
"item": {
"number": 1
},
"name": "<string>",
"body": "<string>",
"items": [
{
"id": "<string>",
"commit": "<string>",
"criterion": "<string>",
"inputs": "<string>",
"reason": "<string>",
"refs": [
{
"path": "<string>",
"changed": true,
"href": "<string>",
"inDiff": true,
"line": 1
}
]
}
],
"link": "<string>"
},
"schemaVersion": 1
}
'import requests
url = "https://api.outerlayer.ai/v1/emitted-results"
payload = {
"emit": {
"clientEmitId": "<string>",
"emittedAt": "<string>",
"item": { "number": 1 },
"name": "<string>",
"body": "<string>",
"items": [
{
"id": "<string>",
"commit": "<string>",
"criterion": "<string>",
"inputs": "<string>",
"reason": "<string>",
"refs": [
{
"path": "<string>",
"changed": True,
"href": "<string>",
"inDiff": True,
"line": 1
}
]
}
],
"link": "<string>"
},
"schemaVersion": 1
}
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({
emit: {
clientEmitId: '<string>',
emittedAt: '<string>',
item: {number: 1},
name: '<string>',
body: JSON.stringify('<string>'),
items: [
{
id: '<string>',
commit: '<string>',
criterion: '<string>',
inputs: '<string>',
reason: '<string>',
refs: [{path: '<string>', changed: true, href: '<string>', inDiff: true, line: 1}]
}
],
link: '<string>'
},
schemaVersion: 1
})
};
fetch('https://api.outerlayer.ai/v1/emitted-results', 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/emitted-results",
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([
'emit' => [
'clientEmitId' => '<string>',
'emittedAt' => '<string>',
'item' => [
'number' => 1
],
'name' => '<string>',
'body' => '<string>',
'items' => [
[
'id' => '<string>',
'commit' => '<string>',
'criterion' => '<string>',
'inputs' => '<string>',
'reason' => '<string>',
'refs' => [
[
'path' => '<string>',
'changed' => true,
'href' => '<string>',
'inDiff' => true,
'line' => 1
]
]
]
],
'link' => '<string>'
],
'schemaVersion' => 1
]),
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/emitted-results"
payload := strings.NewReader("{\n \"emit\": {\n \"clientEmitId\": \"<string>\",\n \"emittedAt\": \"<string>\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"body\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"commit\": \"<string>\",\n \"criterion\": \"<string>\",\n \"inputs\": \"<string>\",\n \"reason\": \"<string>\",\n \"refs\": [\n {\n \"path\": \"<string>\",\n \"changed\": true,\n \"href\": \"<string>\",\n \"inDiff\": true,\n \"line\": 1\n }\n ]\n }\n ],\n \"link\": \"<string>\"\n },\n \"schemaVersion\": 1\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/emitted-results")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emit\": {\n \"clientEmitId\": \"<string>\",\n \"emittedAt\": \"<string>\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"body\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"commit\": \"<string>\",\n \"criterion\": \"<string>\",\n \"inputs\": \"<string>\",\n \"reason\": \"<string>\",\n \"refs\": [\n {\n \"path\": \"<string>\",\n \"changed\": true,\n \"href\": \"<string>\",\n \"inDiff\": true,\n \"line\": 1\n }\n ]\n }\n ],\n \"link\": \"<string>\"\n },\n \"schemaVersion\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/emitted-results")
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 \"emit\": {\n \"clientEmitId\": \"<string>\",\n \"emittedAt\": \"<string>\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"body\": \"<string>\",\n \"items\": [\n {\n \"id\": \"<string>\",\n \"commit\": \"<string>\",\n \"criterion\": \"<string>\",\n \"inputs\": \"<string>\",\n \"reason\": \"<string>\",\n \"refs\": [\n {\n \"path\": \"<string>\",\n \"changed\": true,\n \"href\": \"<string>\",\n \"inDiff\": true,\n \"line\": 1\n }\n ]\n }\n ],\n \"link\": \"<string>\"\n },\n \"schemaVersion\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": {
"body": "<string>",
"created": true,
"id": "<string>",
"name": "<string>",
"provenance": "ci",
"recordedAt": "<string>",
"recordedBy": "<string>",
"result": "pass",
"source": "machine",
"workItemId": "<string>"
}
}{
"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>"
}
}