Skip to content
Rigel docs
Open Rigel

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#

Move a task under another task, or reorder it: parameters
FieldDescription
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.

Move a task under another task, or reorder it: request body fields
FieldDescription
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.

at most 3 items

Response#

200 The command was applied.

Move a task under another task, or reorder it: response fields
FieldDescription
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.

Move a task under another task, or reorder it: errors
StatusCodeWhen
400validation_failedA field is missing, misspelled or out of range. details.fields lists each problem.
401unauthenticatedThe request has no valid session.
404task_not_found
  • Before a task that is not there.
  • Under a parent that is not there.
  • A missing task.
404not_foundThe household doesn't exist, or you aren't a member of it.
409parent_cycle
  • Under itself.
  • Under one of its own subtasks.
409not_a_sibling
  • Before a task under a different parent.
  • Before itself.
409idempotency_key_reusedThe 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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0DTJ7YM0QB26EJHFZ

{
  "result": {},
  "version": 1
}

Into the first spot under a parent

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R08SMV3MX085Q42JQB

{
  "result": {},
  "version": 1
}

Between two siblings

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0XERFA5X0K0F1FRA3

{
  "result": {},
  "version": 1
}

Reordering within the same parent

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R01GZKA0GGH0C6JSW2

{
  "result": {},
  "version": 1
}

Staying in place writes nothing

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R059DN5YVCQ7TCZAB7

{
  "result": {},
  "version": 1
}

To top level with nothing else there

Request, curl
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
}'
Request, TypeScript
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();
Request, HTTP
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
}
Response, 200
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

Request, curl
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"
  ]
}'
Request, TypeScript
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();
Request, HTTP
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"
  ]
}
Response, 200
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

Request, curl
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"
  ]
}'
Request, TypeScript
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();
Request, HTTP
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"
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R0MNJN1GDZX0T56KC5

{
  "result": {},
  "version": 1
}

Inherit does nothing at top level

Request, curl
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"
  ]
}'
Request, TypeScript
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();
Request, HTTP
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"
  ]
}
Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01K9D9S2R01MSYYQMT5PXJRPSZ

{
  "result": {},
  "version": 1
}

Under itself

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 409
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 409
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 409
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 409
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 404
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 404
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

Request, curl
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"
}'
Request, TypeScript
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();
Request, HTTP
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"
}
Response, 404
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.

Request, curl
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"
  ]
}'
Request, TypeScript
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();
Request, HTTP
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"
  ]
}
Response, 200
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.

Rigel is in early access, and sign-up is by invitation. Open Rigel