Update a plan step
curl --request PATCH \
--url http://localhost:3001/api/v1/tasks/{id}/steps/{stepId} \
--header 'Content-Type: application/json' \
--cookie nut-session= \
--data '
{
"description": "<string>",
"command": "<string>",
"expectedOutcome": "<string>",
"output": "<string>",
"error": "<string>"
}
'import requests
url = "http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}"
payload = {
"description": "<string>",
"command": "<string>",
"expectedOutcome": "<string>",
"output": "<string>",
"error": "<string>"
}
headers = {
"cookie": "nut-session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'nut-session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
command: '<string>',
expectedOutcome: '<string>',
output: '<string>',
error: '<string>'
})
};
fetch('http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'command' => '<string>',
'expectedOutcome' => '<string>',
'output' => '<string>',
'error' => '<string>'
]),
CURLOPT_COOKIE => "nut-session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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 := "http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"command\": \"<string>\",\n \"expectedOutcome\": \"<string>\",\n \"output\": \"<string>\",\n \"error\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "nut-session=")
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.patch("http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}")
.header("cookie", "nut-session=")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"command\": \"<string>\",\n \"expectedOutcome\": \"<string>\",\n \"output\": \"<string>\",\n \"error\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'nut-session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"command\": \"<string>\",\n \"expectedOutcome\": \"<string>\",\n \"output\": \"<string>\",\n \"error\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"title": "<string>",
"intent": "<string>",
"content": "<string>",
"readiness": 50,
"tags": [
"<string>"
],
"author": {
"id": "<string>",
"name": "<string>"
},
"reviewers": [
"<string>"
],
"planSteps": [
{
"id": "<string>",
"description": "<string>",
"command": "<string>",
"expectedOutcome": "<string>",
"output": "<string>",
"error": "<string>",
"executedAt": "2023-11-07T05:31:56Z"
}
],
"comments": [
{
"id": "<string>",
"author": "<string>",
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"changes": [
{
"path": "<string>",
"content": "<string>",
"oldPath": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}Tasks
Update a plan step
Update an existing plan step on a task (e.g. change status, description, or other fields)
PATCH
/
api
/
v1
/
tasks
/
{id}
/
steps
/
{stepId}
Update a plan step
curl --request PATCH \
--url http://localhost:3001/api/v1/tasks/{id}/steps/{stepId} \
--header 'Content-Type: application/json' \
--cookie nut-session= \
--data '
{
"description": "<string>",
"command": "<string>",
"expectedOutcome": "<string>",
"output": "<string>",
"error": "<string>"
}
'import requests
url = "http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}"
payload = {
"description": "<string>",
"command": "<string>",
"expectedOutcome": "<string>",
"output": "<string>",
"error": "<string>"
}
headers = {
"cookie": "nut-session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'nut-session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
command: '<string>',
expectedOutcome: '<string>',
output: '<string>',
error: '<string>'
})
};
fetch('http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'command' => '<string>',
'expectedOutcome' => '<string>',
'output' => '<string>',
'error' => '<string>'
]),
CURLOPT_COOKIE => "nut-session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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 := "http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"command\": \"<string>\",\n \"expectedOutcome\": \"<string>\",\n \"output\": \"<string>\",\n \"error\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "nut-session=")
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.patch("http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}")
.header("cookie", "nut-session=")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"command\": \"<string>\",\n \"expectedOutcome\": \"<string>\",\n \"output\": \"<string>\",\n \"error\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/tasks/{id}/steps/{stepId}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'nut-session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"command\": \"<string>\",\n \"expectedOutcome\": \"<string>\",\n \"output\": \"<string>\",\n \"error\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"title": "<string>",
"intent": "<string>",
"content": "<string>",
"readiness": 50,
"tags": [
"<string>"
],
"author": {
"id": "<string>",
"name": "<string>"
},
"reviewers": [
"<string>"
],
"planSteps": [
{
"id": "<string>",
"description": "<string>",
"command": "<string>",
"expectedOutcome": "<string>",
"output": "<string>",
"error": "<string>",
"executedAt": "2023-11-07T05:31:56Z"
}
],
"comments": [
{
"id": "<string>",
"author": "<string>",
"content": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"changes": [
{
"path": "<string>",
"content": "<string>",
"oldPath": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
sessionCookiebearerAuthapiKey
Session cookie authentication
Body
application/json
⌘I