Skip to main content

/o/tasks/list

Endpoint

/o/tasks/list

Overview

Returns paginated task list output in DataTables-compatible structure.

Authentication

  • API Key (parameter): api_key=YOUR_API_KEY
  • Auth Token (parameter): auth_token=YOUR_AUTH_TOKEN
  • Auth Token (header): countly-token: YOUR_AUTH_TOKEN

Permissions

  • Requires read access to feature core.
  • app_id is required for non-global users by read validation rules.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API authentication key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
app_idStringYes (for non-global users)App context for read permission validation and data-source filtering.
queryJSON String (Object) or ObjectNoAdditional Mongo-style query object.
data_sourceStringNoall, independent, or app-scoped mode.
periodStringNoTime range filter converted to ts query.
iDisplayStartNumberNoPagination offset.
iDisplayLengthNumberNoPagination page size.
iSortCol_0NumberNoSort column index.
sSortDir_0StringNoSort direction (asc / desc).
sSearchStringNoKeyword filter for task listing.
sEchoString or NumberNoDataTables echo token returned as-is.

Parameter Semantics

  • Visibility filter is always enforced:
    • if query.creator matches current user, creator-only filter is used
    • otherwise, global-or-creator visibility filter is applied
  • Subtasks are excluded (subtask must not exist).
  • query parsing failures fall back to {}.

Response

Success Response

{
"aaData": [
{
"_id": "17f0f6c3a2c42cbced96d4a01f88f9a7f45bc7a5",
"report_name": "events-30days.csv",
"status": "completed",
"type": "tableExport",
"end": 1771199042000,
"start": 1771199023000
}
],
"iTotalDisplayRecords": 24,
"iTotalRecords": 24,
"sEcho": 1
}

Response Fields

FieldTypeDescription
aaDataArrayPaginated task rows.
iTotalDisplayRecordsNumberTotal rows matching applied query.
iTotalRecordsNumberTotal rows reported for table (same as display count in current handler).
sEchoString or NumberEcho value from request.

Error Responses

Status Code: 500 Internal Server Error

{
"result": "\"Query failed\""
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Paginated list modeQuery execution succeedsApplies visibility, data-source, keyword, sort, and paging filters; returns DataTables payload.Raw object { aaData, iTotalDisplayRecords, iTotalRecords, sEcho }
Failure modeTask table query failsReturns query-failed error response.Wrapped string { "result": "\"Query failed\"" }

Impact on Other Data

  • Read-only endpoint.

Audit & System Logs

  • No /systemlogs action is emitted by this endpoint.

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersAuthentication and visibility scopingReads caller identity used by read validation and creator visibility filtering.
countly.long_tasksTask list sourceReads task records with paging/sorting/filtering.
countly.widgetsDashboard widget linkage enrichmentOptional read to map linked report tasks to dashboard context.
countly.dashboardsDashboard linkage enrichmentOptional read to map widget IDs to dashboard IDs.

Examples

Example 1: First page

/o/tasks/list?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
iDisplayStart=0&
iDisplayLength=10&
sEcho=1
/o/tasks/list?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
iDisplayStart=0&
iDisplayLength=20&
iSortCol_0=7&
sSortDir_0=desc&
sSearch=export&
sEcho=2

Operational Considerations

  • This endpoint is intended for paginated UI/table usage.
  • Very broad filters can still be expensive due sorting/search over task history.

Last Updated

2026-02-17