Store a plan's milestones
curl --request PUT \
--url https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"children": [
{
"milestone": "<string>",
"number": 1
}
],
"milestones": [
"<string>"
]
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones"
payload = {
"children": [
{
"milestone": "<string>",
"number": 1
}
],
"milestones": ["<string>"]
}
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Outerlayer-App-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({children: [{milestone: '<string>', number: 1}], milestones: ['<string>']})
};
fetch('https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones', 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-milestones",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'children' => [
[
'milestone' => '<string>',
'number' => 1
]
],
'milestones' => [
'<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-milestones"
payload := strings.NewReader("{\n \"children\": [\n {\n \"milestone\": \"<string>\",\n \"number\": 1\n }\n ],\n \"milestones\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"children\": [\n {\n \"milestone\": \"<string>\",\n \"number\": 1\n }\n ],\n \"milestones\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"children\": [\n {\n \"milestone\": \"<string>\",\n \"number\": 1\n }\n ],\n \"milestones\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"children": 123,
"milestones": 123
}
}{
"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
Store a plan's milestones
Stores the milestones of the plan of a parent, in order, and puts each listed child in its milestone. outerlayer spec file --plan calls it after it links the items, so a plan filed from a plan file keeps its milestones. It needs the File a spec permission, as filing does, and not the permission to edit a plan. A milestone that the plan has already keeps its place. Refused with link_crosses_milestones when a child would wait on a child of a later milestone. Refused with work_plans_off when plans are not on for the organization.
PUT
/
v1
/
work-items
/
{number}
/
plan-milestones
Store a plan's milestones
curl --request PUT \
--url https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"children": [
{
"milestone": "<string>",
"number": 1
}
],
"milestones": [
"<string>"
]
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones"
payload = {
"children": [
{
"milestone": "<string>",
"number": 1
}
],
"milestones": ["<string>"]
}
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Outerlayer-App-Id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({children: [{milestone: '<string>', number: 1}], milestones: ['<string>']})
};
fetch('https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones', 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-milestones",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'children' => [
[
'milestone' => '<string>',
'number' => 1
]
],
'milestones' => [
'<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-milestones"
payload := strings.NewReader("{\n \"children\": [\n {\n \"milestone\": \"<string>\",\n \"number\": 1\n }\n ],\n \"milestones\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"children\": [\n {\n \"milestone\": \"<string>\",\n \"number\": 1\n }\n ],\n \"milestones\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/{number}/plan-milestones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"children\": [\n {\n \"milestone\": \"<string>\",\n \"number\": 1\n }\n ],\n \"milestones\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"children": 123,
"milestones": 123
}
}{
"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