Create task
curl --request POST \
--url http://localhost:3001/api/v1/tasks \
--header 'Content-Type: application/json' \
--cookie nut-session= \
--data '
{
"title": "<string>",
"intent": "<string>",
"content": "<string>",
"priority": "medium",
"readiness": 50,
"tags": [
"<string>"
],
"author": {
"id": "<string>",
"name": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/v1/tasks"
payload = {
"title": "<string>",
"intent": "<string>",
"content": "<string>",
"priority": "medium",
"readiness": 50,
"tags": ["<string>"],
"author": {
"id": "<string>",
"name": "<string>"
}
}
headers = {
"cookie": "nut-session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'nut-session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
intent: '<string>',
content: '<string>',
priority: 'medium',
readiness: 50,
tags: ['<string>'],
author: {id: '<string>', name: '<string>'}
})
};
fetch('http://localhost:3001/api/v1/tasks', 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",
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([
'title' => '<string>',
'intent' => '<string>',
'content' => '<string>',
'priority' => 'medium',
'readiness' => 50,
'tags' => [
'<string>'
],
'author' => [
'id' => '<string>',
'name' => '<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"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"intent\": \"<string>\",\n \"content\": \"<string>\",\n \"priority\": \"medium\",\n \"readiness\": 50,\n \"tags\": [\n \"<string>\"\n ],\n \"author\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:3001/api/v1/tasks")
.header("cookie", "nut-session=")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"intent\": \"<string>\",\n \"content\": \"<string>\",\n \"priority\": \"medium\",\n \"readiness\": 50,\n \"tags\": [\n \"<string>\"\n ],\n \"author\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'nut-session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"intent\": \"<string>\",\n \"content\": \"<string>\",\n \"priority\": \"medium\",\n \"readiness\": 50,\n \"tags\": [\n \"<string>\"\n ],\n \"author\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\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>"
}
}Tasks
Create task
Create a new task
POST
/
api
/
v1
/
tasks
Create task
curl --request POST \
--url http://localhost:3001/api/v1/tasks \
--header 'Content-Type: application/json' \
--cookie nut-session= \
--data '
{
"title": "<string>",
"intent": "<string>",
"content": "<string>",
"priority": "medium",
"readiness": 50,
"tags": [
"<string>"
],
"author": {
"id": "<string>",
"name": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/v1/tasks"
payload = {
"title": "<string>",
"intent": "<string>",
"content": "<string>",
"priority": "medium",
"readiness": 50,
"tags": ["<string>"],
"author": {
"id": "<string>",
"name": "<string>"
}
}
headers = {
"cookie": "nut-session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'nut-session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
intent: '<string>',
content: '<string>',
priority: 'medium',
readiness: 50,
tags: ['<string>'],
author: {id: '<string>', name: '<string>'}
})
};
fetch('http://localhost:3001/api/v1/tasks', 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",
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([
'title' => '<string>',
'intent' => '<string>',
'content' => '<string>',
'priority' => 'medium',
'readiness' => 50,
'tags' => [
'<string>'
],
'author' => [
'id' => '<string>',
'name' => '<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"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"intent\": \"<string>\",\n \"content\": \"<string>\",\n \"priority\": \"medium\",\n \"readiness\": 50,\n \"tags\": [\n \"<string>\"\n ],\n \"author\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost:3001/api/v1/tasks")
.header("cookie", "nut-session=")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"intent\": \"<string>\",\n \"content\": \"<string>\",\n \"priority\": \"medium\",\n \"readiness\": 50,\n \"tags\": [\n \"<string>\"\n ],\n \"author\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/tasks")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'nut-session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"intent\": \"<string>\",\n \"content\": \"<string>\",\n \"priority\": \"medium\",\n \"readiness\": 50,\n \"tags\": [\n \"<string>\"\n ],\n \"author\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\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>"
}
}Authorizations
sessionCookiebearerAuthapiKey
Session cookie authentication
Body
application/json
- Option 1
- Option 2
Task title/summary
Intent (deprecated, use 'title' instead)
Task content/body (markdown)
Available options:
low, medium, high, critical Readiness score (0-100)
Required range:
0 <= x <= 100Show child attributes
Show child attributes
⌘I