Documentation

GetCloudScriptTaskInstance

Get detail information about a CloudScript task instance.

Request Details

The result includes detail information that's specific to a CloudScript task. Only CloudScript tasks configured as "Run Cloud Script function once" will be retrieved. To get a list of task instances by task, status, or time range, use GetTaskInstances.

GetTaskInstanceRequest
Request Properties
TaskInstanceId (required) String

ID of the requested task instance.

POST https://{{TitleID}}.playfabapi.com/Admin/GetCloudScriptTaskInstance
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "TaskInstanceId": "E52531B47B1761C7-4"
}
        

Response Details

GetCloudScriptTaskInstanceResult
Result Properties
Parameter CloudScriptTaskParameter

Parameter of this task instance

Summary CloudScriptTaskSummary

Status summary of the CloudScript task instance

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "Summary": {
      "TaskInstanceId": "B67ACA247F49EF47-8",
      "TaskIdentifier": {
        "Name": "EnableDailyHappyHour",
        "Id": "B67ACA247F49EF47"
      },
      "StartedAt": "2016-08-23T12:33:14Z",
      "CompletedAt": "2016-08-23T12:33:19Z",
      "Status": "Succeeded",
      "Result": {
        "Revision": 3,
        "FunctionResult": {
          "newScore": 25,
          "isWinner": false
        },
        "Logs": [
          {
            "Level": "Info",
            "Message": "Something normal happened",
            "Data": {
              "secondsAfterStart": 75
            }
          },
          {
            "Level": "Error",
            "Message": "Something unexpected happened"
          }
        ],
        "ExecutionTimeSeconds": 0.03670790046453476,
        "ProcessorTimeSeconds": 0.0,
        "MemoryConsumedBytes": 38904,
        "APIRequestsIssued": 2,
        "HttpRequestsIssued": 0
      }
    },
    "Parameter": {
      "FunctionName": "applyStorePreset",
      "Argument": {
        "presetName": "dailyHappyHour"
      }
    }
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code
TaskInstanceNotFound 1262