curl --request POST \
--url https://api.outerlayer.ai/v1/criteria \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"criteria": [
{
"id": "<string>",
"text": "<string>",
"after": "<string>"
}
],
"drafted": true,
"sessionId": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/criteria"
payload = {
"criteria": [
{
"id": "<string>",
"text": "<string>",
"after": "<string>"
}
],
"drafted": True,
"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({
criteria: [{id: '<string>', text: '<string>', after: '<string>'}],
drafted: true,
sessionId: '<string>'
})
};
fetch('https://api.outerlayer.ai/v1/criteria', 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/criteria",
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([
'criteria' => [
[
'id' => '<string>',
'text' => '<string>',
'after' => '<string>'
]
],
'drafted' => true,
'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/criteria"
payload := strings.NewReader("{\n \"criteria\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"drafted\": true,\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/criteria")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"criteria\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"drafted\": true,\n \"sessionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/criteria")
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 \"criteria\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"drafted\": true,\n \"sessionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"count": 123,
"replaced": true,
"workItemId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Record a work item's acceptance criteria
Records the work item’s acceptance criteria as one list of 1 to 200 criteria, each with an id, its text and the artifact kind that proves it (or null). The list is the only source for the item’s Criteria tab, its count and its status. Every recorded list is kept with who recorded it and when; the current list is the newest. When the item has no list, any caller with the permission may record one. When it has one, a replacement from an agent session, or from a key bound to no member, is refused with 409; a person can always replace it. The key of a criteria job records the first list, and replaces a list that an earlier criteria job recorded; when a build or a person recorded the newest list it is refused with 409, and the item keeps its list. The item is named by item.number, and a request naming none is refused with nothing stored. drafted: true marks a list the build drafted from the issue’s description; it is stored only for a caller that is not a person, so a person’s list is never marked drafted. Recording a list nominates the item for re-evaluation.
curl --request POST \
--url https://api.outerlayer.ai/v1/criteria \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"criteria": [
{
"id": "<string>",
"text": "<string>",
"after": "<string>"
}
],
"drafted": true,
"sessionId": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/criteria"
payload = {
"criteria": [
{
"id": "<string>",
"text": "<string>",
"after": "<string>"
}
],
"drafted": True,
"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({
criteria: [{id: '<string>', text: '<string>', after: '<string>'}],
drafted: true,
sessionId: '<string>'
})
};
fetch('https://api.outerlayer.ai/v1/criteria', 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/criteria",
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([
'criteria' => [
[
'id' => '<string>',
'text' => '<string>',
'after' => '<string>'
]
],
'drafted' => true,
'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/criteria"
payload := strings.NewReader("{\n \"criteria\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"drafted\": true,\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/criteria")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"criteria\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"drafted\": true,\n \"sessionId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/criteria")
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 \"criteria\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"after\": \"<string>\"\n }\n ],\n \"drafted\": true,\n \"sessionId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"count": 123,
"replaced": true,
"workItemId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}