todos:query

Description: Retrieve a list of todos for the authenticated account or person.


Request Schema

{
  "payload": {
    "type": "todos:query",
    "q": {
      "per_page": 25,
      "page": 1,
      "person_id_eq": 123,
      "title_cont": "buy",
      "completed_at_null": true
    }
  },
  "signature": "payload_ed25519_hex_signature",
  "source_public_key": "your_client_public_key"
}

Request Attributes

  • See global request attributes
  • See search request attributes, and:
  • payload.q.person_id_eq - Integer - Filter by assigned person ID
  • payload.q.title_cont - String - Records containing a given string in title
  • payload.q.description_cont - String - Records containing a given string in description
  • payload.q.completed_at_null - Boolean - Filter by completion status (true = not completed, false = completed)

Authentication Behavior

  • Account-based auth (API token or whitelist): Returns all todos for the account
  • Membership-based auth: Returns only todos assigned to the authenticated person’s membership

Response Schema

{
  "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": "todos:query",
    "q": {
      "per_page": 25,
      "page": 1,
      "total": 10
    },
    "resources": [
      {
        "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.resources - Array of todo objects:
    • 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