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
},
"cause": "<string>",
"command": "<string>",
"detail": "<string>",
"error": "<string>",
"line": 1073741824,
"linkReason": "<string>",
"new": true,
"problems": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
},
"suggestion": "<string>",
"symbol": "<string>",
"test": "<string>"
}
],
"schemaVersion": 3,
"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
},
"cause": "<string>",
"command": "<string>",
"detail": "<string>",
"error": "<string>",
"line": 1073741824,
"linkReason": "<string>",
"new": True,
"problems": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
},
"suggestion": "<string>",
"symbol": "<string>",
"test": "<string>"
}
],
"schemaVersion": 3,
"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},
cause: '<string>',
command: '<string>',
detail: '<string>',
error: '<string>',
line: 1073741824,
linkReason: '<string>',
new: true,
problems: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
rule: {path: '<string>', line: 1073741824, quote: '<string>'},
suggestion: '<string>',
symbol: '<string>',
test: '<string>'
}
],
schemaVersion: 3,
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
],
'cause' => '<string>',
'command' => '<string>',
'detail' => '<string>',
'error' => '<string>',
'line' => 1073741824,
'linkReason' => '<string>',
'new' => true,
'problems' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'rule' => [
'path' => '<string>',
'line' => 1073741824,
'quote' => '<string>'
],
'suggestion' => '<string>',
'symbol' => '<string>',
'test' => '<string>'
]
],
'schemaVersion' => 3,
'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 \"cause\": \"<string>\",\n \"command\": \"<string>\",\n \"detail\": \"<string>\",\n \"error\": \"<string>\",\n \"line\": 1073741824,\n \"linkReason\": \"<string>\",\n \"new\": true,\n \"problems\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n },\n \"suggestion\": \"<string>\",\n \"symbol\": \"<string>\",\n \"test\": \"<string>\"\n }\n ],\n \"schemaVersion\": 3,\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 \"cause\": \"<string>\",\n \"command\": \"<string>\",\n \"detail\": \"<string>\",\n \"error\": \"<string>\",\n \"line\": 1073741824,\n \"linkReason\": \"<string>\",\n \"new\": true,\n \"problems\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n },\n \"suggestion\": \"<string>\",\n \"symbol\": \"<string>\",\n \"test\": \"<string>\"\n }\n ],\n \"schemaVersion\": 3,\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 \"cause\": \"<string>\",\n \"command\": \"<string>\",\n \"detail\": \"<string>\",\n \"error\": \"<string>\",\n \"line\": 1073741824,\n \"linkReason\": \"<string>\",\n \"new\": true,\n \"problems\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n },\n \"suggestion\": \"<string>\",\n \"symbol\": \"<string>\",\n \"test\": \"<string>\"\n }\n ],\n \"schemaVersion\": 3,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"count": 123,
"results": [
{
"id": "<string>",
"outcome": "stored",
"candidates": [
{
"id": "<string>",
"reportCount": 123,
"reports": [
{
"title": "<string>",
"cause": "<string>",
"file": "<string>"
}
],
"title": "<string>"
}
],
"method": "strict_key",
"overridden": [
{
"id": "<string>",
"title": "<string>"
}
],
"problems": [
{
"id": "<string>",
"title": "<string>"
}
]
}
],
"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 links every one to one or more factory-level problems. A finding joins the problem that owns one of its strict keys; otherwise it links the problems it names with a reason, or records a new one with new. When none of that applies, the three closest problems in the factory are returned as candidates with outcome needs_choice and that finding is not stored; the rest of the batch is. A re-emitted id replaces that finding in place and keeps its problems. A schemaVersion 1 or 2 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
},
"cause": "<string>",
"command": "<string>",
"detail": "<string>",
"error": "<string>",
"line": 1073741824,
"linkReason": "<string>",
"new": true,
"problems": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
},
"suggestion": "<string>",
"symbol": "<string>",
"test": "<string>"
}
],
"schemaVersion": 3,
"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
},
"cause": "<string>",
"command": "<string>",
"detail": "<string>",
"error": "<string>",
"line": 1073741824,
"linkReason": "<string>",
"new": True,
"problems": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"rule": {
"path": "<string>",
"line": 1073741824,
"quote": "<string>"
},
"suggestion": "<string>",
"symbol": "<string>",
"test": "<string>"
}
],
"schemaVersion": 3,
"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},
cause: '<string>',
command: '<string>',
detail: '<string>',
error: '<string>',
line: 1073741824,
linkReason: '<string>',
new: true,
problems: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
rule: {path: '<string>', line: 1073741824, quote: '<string>'},
suggestion: '<string>',
symbol: '<string>',
test: '<string>'
}
],
schemaVersion: 3,
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
],
'cause' => '<string>',
'command' => '<string>',
'detail' => '<string>',
'error' => '<string>',
'line' => 1073741824,
'linkReason' => '<string>',
'new' => true,
'problems' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'rule' => [
'path' => '<string>',
'line' => 1073741824,
'quote' => '<string>'
],
'suggestion' => '<string>',
'symbol' => '<string>',
'test' => '<string>'
]
],
'schemaVersion' => 3,
'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 \"cause\": \"<string>\",\n \"command\": \"<string>\",\n \"detail\": \"<string>\",\n \"error\": \"<string>\",\n \"line\": 1073741824,\n \"linkReason\": \"<string>\",\n \"new\": true,\n \"problems\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n },\n \"suggestion\": \"<string>\",\n \"symbol\": \"<string>\",\n \"test\": \"<string>\"\n }\n ],\n \"schemaVersion\": 3,\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 \"cause\": \"<string>\",\n \"command\": \"<string>\",\n \"detail\": \"<string>\",\n \"error\": \"<string>\",\n \"line\": 1073741824,\n \"linkReason\": \"<string>\",\n \"new\": true,\n \"problems\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n },\n \"suggestion\": \"<string>\",\n \"symbol\": \"<string>\",\n \"test\": \"<string>\"\n }\n ],\n \"schemaVersion\": 3,\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 \"cause\": \"<string>\",\n \"command\": \"<string>\",\n \"detail\": \"<string>\",\n \"error\": \"<string>\",\n \"line\": 1073741824,\n \"linkReason\": \"<string>\",\n \"new\": true,\n \"problems\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"rule\": {\n \"path\": \"<string>\",\n \"line\": 1073741824,\n \"quote\": \"<string>\"\n },\n \"suggestion\": \"<string>\",\n \"symbol\": \"<string>\",\n \"test\": \"<string>\"\n }\n ],\n \"schemaVersion\": 3,\n \"contextSourceSha\": \"<string>\",\n \"headSha\": \"<string>\",\n \"sessionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"count": 123,
"results": [
{
"id": "<string>",
"outcome": "stored",
"candidates": [
{
"id": "<string>",
"reportCount": 123,
"reports": [
{
"title": "<string>",
"cause": "<string>",
"file": "<string>"
}
],
"title": "<string>"
}
],
"method": "strict_key",
"overridden": [
{
"id": "<string>",
"title": "<string>"
}
],
"problems": [
{
"id": "<string>",
"title": "<string>"
}
]
}
],
"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, how many findings were stored, and one result per finding: stored with its problems, or needs_choice with candidates.
Show child attributes
Show child attributes