Documentation

RunTask

Run a task immediately regardless of its schedule.

Request Details

The returned task instance ID can be used to query for task execution status.

RunTaskRequest
Request Properties
Identifier NameIdentifier

Provide either the task ID or the task name to run a task.

POST https://{{TitleID}}.playfabapi.com/Admin/RunTask
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "Identifier": {
    "Id": "E1772FD927D8539D"
  }
}
        

Response Details

RunTaskResult
Result Properties
TaskInstanceId String

ID of the task instance that is started. This can be used in Get*TaskInstance (e.g. GetCloudScriptTaskInstance) API call to retrieve status for the task instance.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "TaskInstanceId": "E52531B47B1761C7-4"
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code
TaskNotFound 1261