Save the answer of a plan job
curl --request POST \
--url https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"reason": "<string>",
"change": {
"add": [
{
"body": "<string>",
"key": "<string>",
"title": "<string>"
}
],
"edits": [
{
"body": "<string>",
"childNumber": 1,
"title": "<string>"
}
],
"remove": [
1
],
"waitsOn": [
{
"from": 1,
"to": 1
}
]
},
"instructions": "<string>",
"rebuildChild": 1,
"summary": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer"
payload = {
"reason": "<string>",
"change": {
"add": [
{
"body": "<string>",
"key": "<string>",
"title": "<string>"
}
],
"edits": [
{
"body": "<string>",
"childNumber": 1,
"title": "<string>"
}
],
"remove": [1],
"waitsOn": [
{
"from": 1,
"to": 1
}
]
},
"instructions": "<string>",
"rebuildChild": 1,
"summary": "<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({
reason: '<string>',
change: {
add: [{body: JSON.stringify('<string>'), key: '<string>', title: '<string>'}],
edits: [{body: JSON.stringify('<string>'), childNumber: 1, title: '<string>'}],
remove: [1],
waitsOn: [{from: 1, to: 1}]
},
instructions: '<string>',
rebuildChild: 1,
summary: '<string>'
})
};
fetch('https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer', 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/{number}/plan-job/answer",
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([
'reason' => '<string>',
'change' => [
'add' => [
[
'body' => '<string>',
'key' => '<string>',
'title' => '<string>'
]
],
'edits' => [
[
'body' => '<string>',
'childNumber' => 1,
'title' => '<string>'
]
],
'remove' => [
1
],
'waitsOn' => [
[
'from' => 1,
'to' => 1
]
]
],
'instructions' => '<string>',
'rebuildChild' => 1,
'summary' => '<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/work-items/{number}/plan-job/answer"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"change\": {\n \"add\": [\n {\n \"body\": \"<string>\",\n \"key\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"edits\": [\n {\n \"body\": \"<string>\",\n \"childNumber\": 1,\n \"title\": \"<string>\"\n }\n ],\n \"remove\": [\n 1\n ],\n \"waitsOn\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"rebuildChild\": 1,\n \"summary\": \"<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/work-items/{number}/plan-job/answer")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"change\": {\n \"add\": [\n {\n \"body\": \"<string>\",\n \"key\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"edits\": [\n {\n \"body\": \"<string>\",\n \"childNumber\": 1,\n \"title\": \"<string>\"\n }\n ],\n \"remove\": [\n 1\n ],\n \"waitsOn\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"rebuildChild\": 1,\n \"summary\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer")
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 \"reason\": \"<string>\",\n \"change\": {\n \"add\": [\n {\n \"body\": \"<string>\",\n \"key\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"edits\": [\n {\n \"body\": \"<string>\",\n \"childNumber\": 1,\n \"title\": \"<string>\"\n }\n ],\n \"remove\": [\n 1\n ],\n \"waitsOn\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"rebuildChild\": 1,\n \"summary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ok": true
}
}{
"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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Work Items
Save the answer of a plan job
Saves the one answer of the plan job: a plan change (change), a proposal to build a failed child again with instructions (rebuild), or no change (no_change). A change or a rebuild waits for a member to decide it. No change releases the children that wait on the decision at once. A change names children by number and added children by a key. Refusals: plan_child_started (409) for an edit or a removal of a child that has started or shipped, plan_link_to_removed (409), plan_cycle (409), plan_too_many_children (409), plan_wait_crosses_milestone (409), plan_child_not_in_plan (422) and plan_answer_exists (409). Only the item key of a live plan claim on the parent may call it.
POST
/
v1
/
work-items
/
{number}
/
plan-job
/
answer
Save the answer of a plan job
curl --request POST \
--url https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"reason": "<string>",
"change": {
"add": [
{
"body": "<string>",
"key": "<string>",
"title": "<string>"
}
],
"edits": [
{
"body": "<string>",
"childNumber": 1,
"title": "<string>"
}
],
"remove": [
1
],
"waitsOn": [
{
"from": 1,
"to": 1
}
]
},
"instructions": "<string>",
"rebuildChild": 1,
"summary": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer"
payload = {
"reason": "<string>",
"change": {
"add": [
{
"body": "<string>",
"key": "<string>",
"title": "<string>"
}
],
"edits": [
{
"body": "<string>",
"childNumber": 1,
"title": "<string>"
}
],
"remove": [1],
"waitsOn": [
{
"from": 1,
"to": 1
}
]
},
"instructions": "<string>",
"rebuildChild": 1,
"summary": "<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({
reason: '<string>',
change: {
add: [{body: JSON.stringify('<string>'), key: '<string>', title: '<string>'}],
edits: [{body: JSON.stringify('<string>'), childNumber: 1, title: '<string>'}],
remove: [1],
waitsOn: [{from: 1, to: 1}]
},
instructions: '<string>',
rebuildChild: 1,
summary: '<string>'
})
};
fetch('https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer', 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/{number}/plan-job/answer",
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([
'reason' => '<string>',
'change' => [
'add' => [
[
'body' => '<string>',
'key' => '<string>',
'title' => '<string>'
]
],
'edits' => [
[
'body' => '<string>',
'childNumber' => 1,
'title' => '<string>'
]
],
'remove' => [
1
],
'waitsOn' => [
[
'from' => 1,
'to' => 1
]
]
],
'instructions' => '<string>',
'rebuildChild' => 1,
'summary' => '<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/work-items/{number}/plan-job/answer"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"change\": {\n \"add\": [\n {\n \"body\": \"<string>\",\n \"key\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"edits\": [\n {\n \"body\": \"<string>\",\n \"childNumber\": 1,\n \"title\": \"<string>\"\n }\n ],\n \"remove\": [\n 1\n ],\n \"waitsOn\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"rebuildChild\": 1,\n \"summary\": \"<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/work-items/{number}/plan-job/answer")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"change\": {\n \"add\": [\n {\n \"body\": \"<string>\",\n \"key\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"edits\": [\n {\n \"body\": \"<string>\",\n \"childNumber\": 1,\n \"title\": \"<string>\"\n }\n ],\n \"remove\": [\n 1\n ],\n \"waitsOn\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"rebuildChild\": 1,\n \"summary\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{number}/plan-job/answer")
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 \"reason\": \"<string>\",\n \"change\": {\n \"add\": [\n {\n \"body\": \"<string>\",\n \"key\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"edits\": [\n {\n \"body\": \"<string>\",\n \"childNumber\": 1,\n \"title\": \"<string>\"\n }\n ],\n \"remove\": [\n 1\n ],\n \"waitsOn\": [\n {\n \"from\": 1,\n \"to\": 1\n }\n ]\n },\n \"instructions\": \"<string>\",\n \"rebuildChild\": 1,\n \"summary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"ok": true
}
}{
"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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Body
application/json