Report that a step has started on a work item
curl --request POST \
--url https://api.outerlayer.ai/v1/work-items/steps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"clientStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item": {
"number": 1
},
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/steps"
payload = {
"clientStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item": { "number": 1 },
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z"
}
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({
clientStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
item: {number: 1},
name: '<string>',
startedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.outerlayer.ai/v1/work-items/steps', 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/steps",
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([
'clientStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'item' => [
'number' => 1
],
'name' => '<string>',
'startedAt' => '2023-11-07T05:31:56Z'
]),
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/steps"
payload := strings.NewReader("{\n \"clientStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\"\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/steps")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/steps")
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 \"clientStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"item": {
"number": 123
},
"startedAt": "<string>"
}
}{
"data": {
"id": "<string>",
"item": {
"number": 123
},
"startedAt": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Work Items
Report that a step has started on a work item
Records that an agent started a step, with any name of 1 to 80 characters on one line, and the time it started. The item is named by its number in this factory. Who started the step is derived from the credential: the host’s label when the caller holds the item’s live host lease, otherwise the display name of the member the key is bound to. Retrying with the same clientStepId stores nothing new and answers 200 with the stored step. A start time later than the moment the request is received is stored as the receive time. A key scoped to one work item may report steps only on that item.
POST
/
v1
/
work-items
/
steps
Report that a step has started on a work item
curl --request POST \
--url https://api.outerlayer.ai/v1/work-items/steps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Outerlayer-App-Id: <api-key>' \
--data '
{
"clientStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item": {
"number": 1
},
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.outerlayer.ai/v1/work-items/steps"
payload = {
"clientStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item": { "number": 1 },
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z"
}
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({
clientStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
item: {number: 1},
name: '<string>',
startedAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.outerlayer.ai/v1/work-items/steps', 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/steps",
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([
'clientStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'item' => [
'number' => 1
],
'name' => '<string>',
'startedAt' => '2023-11-07T05:31:56Z'
]),
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/steps"
payload := strings.NewReader("{\n \"clientStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\"\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/steps")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clientStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/work-items/steps")
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 \"clientStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"item\": {\n \"number\": 1\n },\n \"name\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"item": {
"number": 123
},
"startedAt": "<string>"
}
}{
"data": {
"id": "<string>",
"item": {
"number": 123
},
"startedAt": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<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
application/json
Response
The step was already stored; its stored values.
Show child attributes
Show child attributes