Skip to main content

/i/tasks/update

Endpoint

/i/tasks/update

Overview

Requests a rerun of an existing task by ID.

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 write access to feature core for the target app.

Request Parameters

ParameterTypeRequiredDescription
api_keyStringYes (or use auth_token)Dashboard API authentication key.
auth_tokenStringYes (or use api_key)Dashboard auth token.
app_idStringYesApp ID used for write-permission validation.
task_idStringYesTask ID to rerun.

Response

Success Response

Rerun accepted:

{
"result": "Success"
}

Task cannot be rerun:

{
"result": "This task cannot be run again"
}

No runnable auth context:

{
"result": "No permission to run this task"
}

Response Fields

FieldTypeDescription
resultStringRerun outcome message from task manager.

Error Responses

Status Code: 400 Bad Request

{
"result": "Missing parameter \"task_id\""
}

Behavior/Processing

Behavior Modes

ModeTriggerProcessing PathResponse Shape
Rerun modeTask has stored replayable request payloadMarks task as rerunning and replays request.Wrapped string { "result": "Success" }
Non-rerunnable modeTask missing replayable request or task not foundReturns informational no-rerun message.Wrapped string { "result": "This task cannot be run again" }
Permission fallback modeReplay request has no usable API key contextReturns permission message from rerun flow.Wrapped string { "result": "No permission to run this task" }

Impact on Other Data

  • Updates task state and may produce new task result output.

Audit & System Logs

  • No direct /systemlogs action is emitted by this endpoint.

Database Collections

CollectionUsed forData touched by this endpoint
countly.membersReplay permission context resolutionReads member/global-admin API key fallback when rerunning stored requests.
countly.long_tasksTask status and request replay sourceReads task definition and updates run status.
countly_fs.task_resultsTask output storageMay be updated when rerun completes with new result data.

Examples

Example 1: Rerun task

/i/tasks/update?
api_key=YOUR_API_KEY&
app_id=6991c75b024cb89cdc04efd2&
task_id=17f0f6c3a2c42cbced96d4a01f88f9a7f45bc7a5

Operational Considerations

  • Rerun starts asynchronous processing; result message is immediate and not final completion status.

Limitations

  • Endpoint does not return final task output; check task endpoints for completion state and data.

Last Updated

2026-02-17