todo:query
Description: Retrieve a single todo by ID with authentication-based scoping.
Request Schema
{
"payload": {
"type": "todo:query",
"id": 1
},
"signature": "payload_ed25519_hex_signature",
"source_public_key": "your_client_public_key"
}
Request Attributes
- See global request attributes
-
payload.id- Integer - Required. The ID of the todo to retrieve
Authentication Behavior
- Account-based auth (API token or whitelist): Can query any todo belonging to the account
- Membership-based auth: Can only query todos assigned to the authenticated person’s membership. Returns 403 for other persons’ todos.
Error Responses
404 Not Found - Todo not found or taskable does not belong to the account
{
"payload": { "type": "todo:query" },
"error": "Todo not found",
"status": "not_found"
}
403 Forbidden - Membership user attempting to access another person’s todo
{
"payload": { "type": "todo:query" },
"error": "Forbidden: You can only query your own todos",
"status": "forbidden"
}
400 Bad Request - Invalid request or unexpected error
{
"payload": { "type": "todo:query" },
"error": "Error message",
"status": "bad_request"
}
Response Schema (Success)
{
"source_public_key": "community_public_key",
"source_site": {
"protocol": "https",
"fqdn": "arkipel.localhost:3000"
},
"created_at": "2025-03-18T10:30:00Z",
"signature": "8b6392d5550605bd6ccddf9c21ebec470de4b44e4b4deb746076e37ab61c5346e07e7c7c7cebb5bbee41cdd92a476bcd3f02373d146ec165b31c31fc31c9ce0d",
"payload": {
"type": "todo:query",
"resource": {
"id": 1,
"title": "Buy groceries",
"description": "Milk, eggs, bread",
"completed_at": null,
"position": 1,
"created_at": "2025-03-17T09:00:00Z",
"updated_at": "2025-03-17T09:00:00Z",
"taskable": {
"type": "Activity",
"id": 123,
"title": "Weekly Tasks"
},
"person": {
"id": 456,
"name": "John Doe"
}
}
}
}
Response Attributes
-
payload.resource- Single todo object:-
id- Integer - Unique identifier -
title- String - Todo title -
description- String - Todo description (optional) -
completed_at- ISO 8601 timestamp or null - Completion timestamp -
position- Integer - Sort order within the taskable -
created_at- ISO 8601 timestamp - Creation time -
updated_at- ISO 8601 timestamp - Last update time -
taskable- Object - Parent entity (Activity, Person, or any polymorphic type)-
type- String - Polymorphic type (e.g., “Activity”, “Person”) -
id- Integer - Taskable ID -
title- String - Taskable title (for Activities only)
-
-
person- Object or null - Assigned person-
id- Integer - Person ID -
name- String - Person’s full name
-
-