Move a task under another task, or reorder it
tasks.task.move
POST/api/v1/households/{household_id}/commands/tasks.task.move
- Command
- Rigel runs it
- Applies offline
Changes a task's parent, its place among its siblings, or both. Fails with task_not_found, parent_cycle (under itself or one of its own subtasks), or not_a_sibling (before_task_id is under a different parent).
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
Idempotency-Keyheaderstringoptional | The command's ID. Reuse it when retrying the same command. |
Request body#
JSON, as application/json.
| Field | Description |
|---|---|
task_idstringrequired | A task ID, such as tsk_01JC0000000000000000000000. |
parent_task_idstring or nulloptional | The new parent, or null to make it top-level. Leave out to keep its parent. |
before_task_idstring or nulloptional | A task under the same parent to put it just before. Null or left out puts it last. |
inheritarray, each one of: priority, assignee, tagsoptional | Take these from the new parent: its priority or assignee replace the task's, its tags are added. |
Response#
200 The command was applied.
| Field | Description |
|---|---|
resultobjectrequired | What the command returned, such as the IDs it created. |
versionintegerrequired | The household version after the command. |
Errors#
Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.
| Status | Code | When |
|---|---|---|
400 | validation_failed | A field is missing, misspelled or out of range. details.fields lists each problem. |
401 | unauthenticated | The request has no valid session. |
404 | task_not_found |
|
404 | not_found | The household doesn't exist, or you aren't a member of it. |
409 | parent_cycle |
|
409 | not_a_sibling |
|
409 | idempotency_key_reused | The Idempotency-Key was already used for a different command. |
Examples#
These are real. Each scenario is one of the command's test cases, run on a household when this site was built, and the response is what the API returned.
Under a new parent, last
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000P",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DTJ7YM0QB26EJHFZ
{
"result": {},
"version": 1
}Into the first spot under a parent
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"before_task_id": "tsk_01JC00000000000000000000S1"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000P",
before_task_id: "tsk_01JC00000000000000000000S1",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"before_task_id": "tsk_01JC00000000000000000000S1"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R08SMV3MX085Q42JQB
{
"result": {},
"version": 1
}Between two siblings
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"before_task_id": "tsk_01JC00000000000000000000S2"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000P",
before_task_id: "tsk_01JC00000000000000000000S2",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"before_task_id": "tsk_01JC00000000000000000000S2"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0XERFA5X0K0F1FRA3
{
"result": {},
"version": 1
}Reordering within the same parent
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC00000000000000000000S3",
"before_task_id": "tsk_01JC00000000000000000000S1"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC00000000000000000000S3",
before_task_id: "tsk_01JC00000000000000000000S1",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC00000000000000000000S3",
"before_task_id": "tsk_01JC00000000000000000000S1"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0HZCAR7GVEKQYB7C9
{
"result": {},
"version": 1
}Moving to the end of its own parent when it is not last
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC00000000000000000000S1"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC00000000000000000000S1",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC00000000000000000000S1"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R01GZKA0GGH0C6JSW2
{
"result": {},
"version": 1
}Staying in place writes nothing
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC00000000000000000000S1",
"before_task_id": "tsk_01JC00000000000000000000S2"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC00000000000000000000S1",
before_task_id: "tsk_01JC00000000000000000000S2",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC00000000000000000000S1",
"before_task_id": "tsk_01JC00000000000000000000S2"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R09RS5PE90MJQEAGA1
{
"result": {},
"version": 1
}Subtasks with no keys are numbered in their order first
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"before_task_id": "tsk_01JC00000000000000000000S2"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000P",
before_task_id: "tsk_01JC00000000000000000000S2",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"before_task_id": "tsk_01JC00000000000000000000S2"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0QN36NMFSFSEDEEGN
{
"result": {},
"version": 1
}To top level, numbering the top-level tasks that have no keys
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null,
"before_task_id": "tsk_01JC000000000000000000000B"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: null,
before_task_id: "tsk_01JC000000000000000000000B",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null,
"before_task_id": "tsk_01JC000000000000000000000B"
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R059DN5YVCQ7TCZAB7
{
"result": {},
"version": 1
}To top level with nothing else there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: null,
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R06D5XF6QS48DX7MJS
{
"result": {},
"version": 1
}Inherit copies the parent's priority and assignee and adds its tags
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"inherit": [
"priority",
"assignee",
"tags"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000P",
inherit: [
"priority",
"assignee",
"tags",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"inherit": [
"priority",
"assignee",
"tags"
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R07G0550CH2T7CTSGN
{
"result": {},
"version": 1
}Inherit from a parent with no assignee or priority clears them
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"inherit": [
"priority",
"assignee"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000P",
inherit: [
"priority",
"assignee",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000P",
"inherit": [
"priority",
"assignee"
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MNJN1GDZX0T56KC5
{
"result": {},
"version": 1
}Inherit does nothing at top level
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null,
"inherit": [
"priority"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: null,
inherit: [
"priority",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null,
"inherit": [
"priority"
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R01MSYYQMT5PXJRPSZ
{
"result": {},
"version": 1
}Under itself
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000A",
"parent_task_id": "tsk_01JC000000000000000000000A"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000A",
parent_task_id: "tsk_01JC000000000000000000000A",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000A",
"parent_task_id": "tsk_01JC000000000000000000000A"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0BTB7ZYRKYNGABEFQ
{
"error": {
"code": "parent_cycle",
"message": "A task can't go under itself or one of its own subtasks. No changes were applied.",
"details": {
"task_id": "tsk_01JC000000000000000000000A",
"parent_task_id": "tsk_01JC000000000000000000000A"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0BTB7ZYRKYNGABEFQ"
}
}Under one of its own subtasks
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000A",
"parent_task_id": "tsk_01JC000000000000000000000C"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000A",
parent_task_id: "tsk_01JC000000000000000000000C",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000A",
"parent_task_id": "tsk_01JC000000000000000000000C"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DW63F156Q6W9Q729
{
"error": {
"code": "parent_cycle",
"message": "A task can't go under itself or one of its own subtasks. No changes were applied.",
"details": {
"task_id": "tsk_01JC000000000000000000000A",
"parent_task_id": "tsk_01JC000000000000000000000C"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0DW63F156Q6W9Q729"
}
}Before a task under a different parent
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"before_task_id": "tsk_01JC00000000000000000000S1"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
before_task_id: "tsk_01JC00000000000000000000S1",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"before_task_id": "tsk_01JC00000000000000000000S1"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R092K5E8AAA69X9ZJS
{
"error": {
"code": "not_a_sibling",
"message": "That task isn't under the same parent. No changes were applied.",
"details": {
"before_task_id": "tsk_01JC00000000000000000000S1",
"parent_task_id": null
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R092K5E8AAA69X9ZJS"
}
}Before itself
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"before_task_id": "tsk_01JC000000000000000000000M"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
before_task_id: "tsk_01JC000000000000000000000M",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"before_task_id": "tsk_01JC000000000000000000000M"
}HTTP/1.1 409 Conflict
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MWS7E4JR7RSHBV6Q
{
"error": {
"code": "not_a_sibling",
"message": "That task isn't under the same parent. No changes were applied.",
"details": {
"before_task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": null
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0MWS7E4JR7RSHBV6Q"
}
}Before a task that is not there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"before_task_id": "tsk_01JC000000000000000000000Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
before_task_id: "tsk_01JC000000000000000000000Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"before_task_id": "tsk_01JC000000000000000000000Z"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R00NZ6BRSSJN0NRSA3
{
"error": {
"code": "task_not_found",
"message": "That task isn't there any more. No changes were applied.",
"details": {
"task_id": "tsk_01JC000000000000000000000Z",
"field": "before_task_id"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R00NZ6BRSSJN0NRSA3"
}
}Under a parent that is not there
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000M",
parent_task_id: "tsk_01JC000000000000000000000Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000M",
"parent_task_id": "tsk_01JC000000000000000000000Z"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0KCBX63B7PQK6V4KC
{
"error": {
"code": "task_not_found",
"message": "That task isn't there any more. No changes were applied.",
"details": {
"task_id": "tsk_01JC000000000000000000000Z",
"field": "parent_task_id"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0KCBX63B7PQK6V4KC"
}
}A missing task
curl -X POST 'https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA' \
-d '{
"task_id": "tsk_01JC000000000000000000000Z"
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01JC4N0000AAAAAAAAAAAAAAAA",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01JC000000000000000000000Z",
}),
});
const data = await response.json();POST /api/v1/households/hh_01K9BKKP003AHRZ6DMV29GQY5C/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01JC4N0000AAAAAAAAAAAAAAAA
{
"task_id": "tsk_01JC000000000000000000000Z"
}HTTP/1.1 404 Not Found
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0KE490NESA88BRWY9
{
"error": {
"code": "task_not_found",
"message": "That task isn't there any more. No changes were applied.",
"details": {
"task_id": "tsk_01JC000000000000000000000Z"
},
"recovery": "Read the current state, then send a command that fits it.",
"request_id": "req_01K9D9S2R0KE490NESA88BRWY9"
}
}Move a task into a project
before_task_id puts it ahead of a sibling. inherit adds the new parent's tags to the task.
curl -X POST 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/tasks.task.move' \
-H "Cookie: rigel_session=$RIGEL_SESSION" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: cmd_01M6V9CT3YH7RQE2V81BGGJR95' \
-d '{
"task_id": "tsk_01M6V9CT3WVB6N1KAYP7MV4QCK",
"parent_task_id": "tsk_01M6V9CT2Z01QVT17DRMSXTW4W",
"before_task_id": "tsk_01M6V9CT2ZX70MX87DDSFGCJFZ",
"inherit": [
"tags"
]
}'const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/tasks.task.move", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Idempotency-Key": "cmd_01M6V9CT3YH7RQE2V81BGGJR95",
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
body: JSON.stringify({
task_id: "tsk_01M6V9CT3WVB6N1KAYP7MV4QCK",
parent_task_id: "tsk_01M6V9CT2Z01QVT17DRMSXTW4W",
before_task_id: "tsk_01M6V9CT2ZX70MX87DDSFGCJFZ",
inherit: [
"tags",
],
}),
});
const data = await response.json();POST /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/commands/tasks.task.move HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>
Content-Type: application/json
Idempotency-Key: cmd_01M6V9CT3YH7RQE2V81BGGJR95
{
"task_id": "tsk_01M6V9CT3WVB6N1KAYP7MV4QCK",
"parent_task_id": "tsk_01M6V9CT2Z01QVT17DRMSXTW4W",
"before_task_id": "tsk_01M6V9CT2ZX70MX87DDSFGCJFZ",
"inherit": [
"tags"
]
}HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT3Y1RBJ19FBKW3DQ87K
{
"result": {},
"version": 244
}For Rigel#
Rigel's tool for this command is tasks_task_move. Rigel runs this on its own, then says what it did. The agent guide has the rest.