curl --request POST \
--url https://api.outerlayer.ai/v1/findings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"findings": [
{
"file": "<string>",
"id": "<string>",
"title": "<string>",
"where": {
"label": "<string>",
"round": 1,
"traceId": "<string>",
"turnIndex": 1
},
"line": 1073741824,
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
}
}
],
"schemaVersion": 2,
"contextSourceSha": "<string>",
"headSha": "<string>",
"sessionId": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/findings"
payload = {
"findings": [
{
"file": "<string>",
"id": "<string>",
"title": "<string>",
"where": {
"label": "<string>",
"round": 1,
"traceId": "<string>",
"turnIndex": 1
},
"line": 1073741824,
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
}
}
],
"schemaVersion": 2,
"contextSourceSha": "<string>",
"headSha": "<string>",
"sessionId": "<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({
findings: [
{
file: '<string>',
id: '<string>',
title: '<string>',
where: {label: '<string>', round: 1, traceId: '<string>', turnIndex: 1},
line: 1073741824,
rule: {path: '<string>', line: 1073741824, quote: '<string>'}
}
],
schemaVersion: 2,
contextSourceSha: '<string>',
headSha: '<string>',
sessionId: '<string>'
})
};
fetch('https://api.outerlayer.ai/v1/findings', 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/findings",
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([
'findings' => [
[
'file' => '<string>',
'id' => '<string>',
'title' => '<string>',
'where' => [
'label' => '<string>',
'round' => 1,
'traceId' => '<string>',
'turnIndex' => 1
],
'line' => 1073741824,
'rule' => [
'path' => '<string>',
'line' => 1073741824,
'quote' => '<string>'
]
]
],
'schemaVersion' => 2,
'contextSourceSha' => '<string>',
'headSha' => '<string>',
'sessionId' => '<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/findings"
payload := strings.NewReader("{\n \"findings\": [\n {\n \"file\": \"<string>\",\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"where\": {\n \"label\": \"<string>\",\n \"round\": 1,\n \"traceId\": \"<string>\",\n \"turnIndex\": 1\n },\n \"line\": 1073741824,\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n }\n }\n ],\n \"schemaVersion\": 2,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<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/findings")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"findings\": [\n {\n \"file\": \"<string>\",\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"where\": {\n \"label\": \"<string>\",\n \"round\": 1,\n \"traceId\": \"<string>\",\n \"turnIndex\": 1\n },\n \"line\": 1073741824,\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n }\n }\n ],\n \"schemaVersion\": 2,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/findings")
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 \"findings\": [\n {\n \"file\": \"<string>\",\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"where\": {\n \"label\": \"<string>\",\n \"round\": 1,\n \"traceId\": \"<string>\",\n \"turnIndex\": 1\n },\n \"line\": 1073741824,\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n }\n }\n ],\n \"schemaVersion\": 2,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"count": 123,
"workItemId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Record a batch of findings on a work item
Accepts a batch of 1 to 500 findings — problems an agent hit in the factory, each with a category — and upserts every one on (work item, client id): a re-emitted id replaces that finding in place rather than adding a second one. A schemaVersion 1 batch is refused with a message to upgrade the CLI. Validated against the same contract the CLI checks before it ever sends a byte. Every finding anchors to a work item, named directly by item.number — never inferred from a session link — and a request naming none is refused outright, with nothing stored. Unlike an emitted check, a session may record findings on the work item it was launched for.
curl --request POST \
--url https://api.outerlayer.ai/v1/findings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"findings": [
{
"file": "<string>",
"id": "<string>",
"title": "<string>",
"where": {
"label": "<string>",
"round": 1,
"traceId": "<string>",
"turnIndex": 1
},
"line": 1073741824,
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
}
}
],
"schemaVersion": 2,
"contextSourceSha": "<string>",
"headSha": "<string>",
"sessionId": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/findings"
payload = {
"findings": [
{
"file": "<string>",
"id": "<string>",
"title": "<string>",
"where": {
"label": "<string>",
"round": 1,
"traceId": "<string>",
"turnIndex": 1
},
"line": 1073741824,
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
}
}
],
"schemaVersion": 2,
"contextSourceSha": "<string>",
"headSha": "<string>",
"sessionId": "<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({
findings: [
{
file: '<string>',
id: '<string>',
title: '<string>',
where: {label: '<string>', round: 1, traceId: '<string>', turnIndex: 1},
line: 1073741824,
rule: {path: '<string>', line: 1073741824, quote: '<string>'}
}
],
schemaVersion: 2,
contextSourceSha: '<string>',
headSha: '<string>',
sessionId: '<string>'
})
};
fetch('https://api.outerlayer.ai/v1/findings', 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/findings",
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([
'findings' => [
[
'file' => '<string>',
'id' => '<string>',
'title' => '<string>',
'where' => [
'label' => '<string>',
'round' => 1,
'traceId' => '<string>',
'turnIndex' => 1
],
'line' => 1073741824,
'rule' => [
'path' => '<string>',
'line' => 1073741824,
'quote' => '<string>'
]
]
],
'schemaVersion' => 2,
'contextSourceSha' => '<string>',
'headSha' => '<string>',
'sessionId' => '<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/findings"
payload := strings.NewReader("{\n \"findings\": [\n {\n \"file\": \"<string>\",\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"where\": {\n \"label\": \"<string>\",\n \"round\": 1,\n \"traceId\": \"<string>\",\n \"turnIndex\": 1\n },\n \"line\": 1073741824,\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n }\n }\n ],\n \"schemaVersion\": 2,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<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/findings")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"findings\": [\n {\n \"file\": \"<string>\",\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"where\": {\n \"label\": \"<string>\",\n \"round\": 1,\n \"traceId\": \"<string>\",\n \"turnIndex\": 1\n },\n \"line\": 1073741824,\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n }\n }\n ],\n \"schemaVersion\": 2,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/findings")
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 \"findings\": [\n {\n \"file\": \"<string>\",\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"where\": {\n \"label\": \"<string>\",\n \"round\": 1,\n \"traceId\": \"<string>\",\n \"turnIndex\": 1\n },\n \"line\": 1073741824,\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n }\n }\n ],\n \"schemaVersion\": 2,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"count": 123,
"workItemId": "<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_*)
Body
Response
The work item the batch was recorded on, and how many findings were written.
Show child attributes
Show child attributes