Skip to main content

/i/tasks/update

Endpoint

/i/tasks/update

Overview

Requests a rerun of an existing task by ID.

Authentication

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

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.

Examples

Example 1: Rerun task

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

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

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.

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.
Implementation details

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.