Skip to main content

List Tasks

Retrieves a paginated list of all HDP tasks with optional search functionality. This endpoint does not require authentication.

Endpoint

GET /tasks

Query Parameters

ParameterTypeRequiredDescription
hdp_tasks_pageintegerNoPage number (default: 1, minimum: 1)
hdp_tasks_per_pageintegerNoNumber of tasks per page (default: 10, minimum: 1, maximum: 100)
hdp_tasks_searchstringNoSearch term to filter tasks by UUID, program hash, or program name (case-insensitive)

Example Request

curl -X GET "https://staging.hdp.api.herodotus.cloud/tasks?hdp_tasks_page=1&hdp_tasks_per_page=10&hdp_tasks_search=01JPJ" \
  -H "Content-Type: application/json"

Response

Success Response (200 OK)

{
  "tasks": [
    {
      "uuid": "01JPJ03YJT1A93D6NF56G4GVEQ",
      "status": "TaskDecommitmentCompleted",
      "destinationChainId": "11155111",
      "contractClassHash": "0x1234...",
      "scheduleMode": "onchain",
      "scheduleTxHash": "0xabcd...",
      "dataSourceChains": ["0xaa36a7", "0xaa37dc"],
      "dataDestinationChain": "0xaa36a7",
      "hdpCoreProgramHash": "0x5678...",
      "taskHash": "0x9abc...",
      "programHash": "0xdef0...",
      "programName": "my_module",
      "outputTreeRoot": "0x1234...",
      "createdAt": "2024-03-17T10:24:00Z",
      "updatedAt": "2024-03-17T10:25:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 10,
    "total": 42,
    "totalPages": 5
  }
}

Response Fields

FieldTypeDescription
tasksarrayArray of task objects
paginationobjectPagination metadata

Task Object Fields

FieldTypeDescription
uuidstringThe unique identifier of the task
statusstringCurrent status of the task
destinationChainIdstringChain ID where the task will be proven
contractClassHashstringHash of the contract class
scheduleModestring | nullSchedule mode: “onchain” or “offchain”
scheduleTxHashstring | nullTransaction hash if scheduled onchain
dataSourceChainsarray | nullArray of source chain IDs
dataDestinationChainstring | nullDestination chain ID
hdpCoreProgramHashstring | nullHDP core program hash
taskHashstring | nullTask hash
programHashstring | nullProgram hash
programNamestring | nullProgram name
outputTreeRootstring | nullOutput tree root
createdAtstringISO 8601 timestamp of task creation
updatedAtstringISO 8601 timestamp of last update

Pagination Object Fields

FieldTypeDescription
pageintegerCurrent page number
perPageintegerNumber of items per page
totalintegerTotal number of tasks
totalPagesintegerTotal number of pages

Notes

  • No authentication is required for this endpoint
  • Tasks are ordered by creation date (newest first)
  • Search is case-insensitive and matches UUID, program hash, or program name
  • Maximum 100 tasks per page to prevent excessive response sizes
  • Empty search string is treated as no search filter