Sweeppea API v3

Fetch To-Do's

Retrieve all To-Do's with advanced filtering and pagination. Admin access required.

POST https://api-v3.sweeppea.com/tickets/fetchTodos

Description

This endpoint retrieves all To-Do's in the system, paginated at 20 items per page and sorted by creation date (newest first). It is restricted to admin users only.

All filter parameters are optional and can be combined freely. Filters support: text search across Title and Description, status (pending/completed), priority level, resource affected, pinned state, date ranges, and year/month filtering.

Authentication & Authorization

🛡️ Admin Only

This endpoint is restricted to administrator accounts. Regular users will receive a 403 Forbidden response.

Request Body Parameters (all optional)

Parameter Type Description
page number Page number for pagination (default: 1, 20 items per page)
search string Search text in Title or Description (case-insensitive)
status string "pending" (open) or "completed"
priority number Filter by priority: 1 = Low, 2 = Medium, 3 = High
resource string Filter by ResourceAffected (e.g. "renaissance", "api", "aws", "general")
pinned boolean Set to true to return only pinned To-Do's
dateFrom string ISO date string — start of creation date range (e.g. "2025-01-01")
dateTo string ISO date string — end of creation date range (e.g. "2025-12-31")
year number Filter by creation year (ignored if dateFrom/dateTo are set)
month number Filter by creation month 1–12 (requires year)

Request Body

All parameters are optional.

Field Type Required Description
page Number No Page number for pagination (default: 1, 20 items per page)
search String No Search text in Title or Description (case-insensitive)
status String No "pending" (open) or "completed"
priority Number No Filter by priority: 1 = Low, 2 = Medium, 3 = High
resource String No Filter by ResourceAffected (e.g. "renaissance", "api", "aws", "general")
pinned Boolean No Set to true to return only pinned To-Do's
dateFrom String No ISO date string — start of creation date range (e.g. "2025-01-01")
dateTo String No ISO date string — end of creation date range (e.g. "2025-12-31")
year Number No Filter by creation year (ignored if dateFrom/dateTo are set)
month Number No Filter by creation month 1–12 (requires year)

Code Examples

curl -X POST "https://api-v3.sweeppea.com/tickets/fetchTodos" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 1,
    "search": "deploy",
    "priority": 3,
    "resource": "api",
    "status": "pending"
  }'

Response

{
  "Response": true,
  "Data": {
    "TotalTodos": 42,
    "Page": 1,
    "Limit": 20,
    "TotalPages": 3,
    "Todos": [
      {
        "TodoToken": "uuid-v4-string",
        "CreationDate": "2025-06-01T10:00:00.000Z",
        "Deadline": null,
        "Title": "Deploy new API endpoint",
        "Description": "Deploy the fetchTodos lambda to production",
        "Status": false,
        "Priority": 3,
        "Pin": false,
        "Views": 5,
        "ResourceAffected": "api"
      }
    ]
  },
  "Telemetry": {
    "DataConsumed": 0,
    "APICalls": 142,
    "MaxAPICalls": 100000
  }
}

Error Responses

{
  "Response": false,
  "Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
  "Code": 401
}
{
  "Response": false,
  "Message": "Admin Access Required",
  "Code": 403
}
{
  "Response": false,
  "Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
  "Code": 500
}
© Sweeppea. All rights reserved.