Skip to main content

/o/tasks/all

Endpoint

/o/tasks/all

Overview

Returns task records visible to current user, with optional query and period filtering.

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)Primary app filter for task query scope.
queryJSON String (Object) or ObjectNoAdditional Mongo-style filter object.
app_idsStringNoComma-separated app ID list. Applied only when list has more than one value.
periodStringNoTime range filter converted to task ts timestamp query.

Parameter Semantics

  • Visibility filter is always enforced: global tasks or tasks created by current member.
  • Subtasks are excluded (subtask must not exist).
  • query parsing failures fall back to {}.

Response

Success Response

[
{
"_id": "17f0f6c3a2c42cbced96d4a01f88f9a7f45bc7a5",
"status": "completed",
"type": "tableExport",
"app_id": "6991c75b024cb89cdc04efd2",
"creator": "65a16f6b8e43c117c38d8f00",
"report_name": "events-30days.csv",
"ts": 1771199023000
}
]

Response Fields

FieldTypeDescription
[]ArrayVisible task records matching filter.
[] ._idStringTask ID.
[] .statusStringTask status (running, completed, errored, etc.).
[] .typeStringTask type label.
[] .app_idStringTask app context.
[] .creatorStringTask creator member ID.
[] .tsNumberTask timestamp.

Error Responses

Status Code: 400 Bad Request

{"result":"Missing parameter \"api_key\" or \"auth_token\""}

Status Code: 401 Unauthorized

{"result":"User does not have right"}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Base list modeDefault call with or without queryApplies visibility filter (global or creator-owned), excludes subtasks, returns matching tasks.Raw array of task objects
Extended app filter modeapp_ids has more than one IDApplies $in app filter override on top of visibility logic.Raw array of task objects
Period-filter modeperiod is providedAdds ts range query based on period parsing.Raw array of task objects

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 metadata sourceReads visible task records matching request filters.

Examples

Example 1: Read tasks for one app

/o/tasks/all?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2

Example 2: Read tasks for multiple apps

/o/tasks/all?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
app_ids=6991c75b024cb89cdc04efd2,6991c75b024cb89cdc04efaa

Operational Considerations

  • This endpoint can return large arrays; prefer paginated listing for UI tables.

Last Updated

2026-02-17