Every tag, and how much it's used
tasks.tag.list
GET/api/v1/households/{household_id}/queries/tasks.tag.list
- Query
- Rigel runs it
All tags by name, with how many open and how many total tasks have each. Reuse these when tagging.
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
Response#
200 The answer.
| Field | Description |
|---|---|
itemsarray of objectsrequired | |
items[].idstringrequired | A tag ID, such as tag_01JC0000000000000000000000. |
items[].namestringrequired | No description. |
items[].open_countintegerrequired | Unfinished tasks with this tag. |
items[].task_countintegerrequired | All tasks with this tag. |
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 | not_found | The household doesn't exist, or you aren't a member of it. |
Examples#
These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.
List the tags
Open tasks and all tasks for each.
Request, curl
curl 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/tasks.tag.list' \
-H "Cookie: rigel_session=$RIGEL_SESSION"Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/tasks.tag.list", {
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();Request, HTTP
GET /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/queries/tasks.tag.list HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>Response, 200
HTTP/1.1 200 OK
Content-Type: application/json
X-Request-Id: req_01M6V9CT4TCTW3XP9MBGZZB1Q4
{
"items": [
{
"id": "tag_01M6V9CT2QMBNSDQ82KK1PJ6AV",
"name": "chores",
"open_count": 1,
"task_count": 2
},
{
"id": "tag_01M6V9CT2HYP2JXTPT7T98VN41",
"name": "errands",
"open_count": 1,
"task_count": 1
},
{
"id": "tag_01M6V9CT2WXE7DZSSQDXC6B23K",
"name": "house",
"open_count": 3,
"task_count": 3
},
{
"id": "tag_01M6V9CT2M8VA69RH7FX0XX026",
"name": "kids",
"open_count": 3,
"task_count": 4
},
{
"id": "tag_01M6V9CT2W0CCE5JSQRR9GSCT6",
"name": "outside",
"open_count": 1,
"task_count": 1
},
{
"id": "tag_01M6V9CT3EYS7FXZH49FJMS5PK",
"name": "phone call",
"open_count": 1,
"task_count": 1
}
]
}For Rigel#
Rigel's tool for this query is tasks_tag_list. Rigel runs this on its own, then says what it did. The agent guide has the rest.