Scheduled Task - Get Cloud Script Task Instance
Get detail information about a CloudScript task instance.
POST https://titleId.playfabapi.com/Admin/GetCloudScriptTaskInstance
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-SecretKey | True |
string |
This API requires a title secret key, available to title admins, from PlayFab Game Manager. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
TaskInstanceId | True |
string |
ID of the requested task instance. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-SecretKey
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Api |
The basic wrapper around every failed API response |
Cloud |
|
Cloud |
|
Execute |
|
Get |
|
Get |
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. |
Log |
|
Name |
Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is immutable and unique. |
Script |
|
Task |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
integer |
Numerical HTTP code |
error |
string |
Playfab error code |
errorCode |
integer |
Numerical PlayFab error code |
errorDetails |
object |
Detailed description of individual issues with the request object |
errorMessage |
string |
Description for the PlayFab errorCode |
status |
string |
String HTTP code |
CloudScriptTaskParameter
Name | Type | Description |
---|---|---|
Argument |
object |
Argument to pass to the CloudScript function. |
FunctionName |
string |
Name of the CloudScript function to execute. |
CloudScriptTaskSummary
Name | Type | Description |
---|---|---|
CompletedAt |
string |
UTC timestamp when the task completed. |
EstimatedSecondsRemaining |
number |
Estimated time remaining in seconds. |
PercentComplete |
number |
Progress represented as percentage. |
Result |
Result of CloudScript execution |
|
ScheduledByUserId |
string |
If manually scheduled, ID of user who scheduled the task. |
StartedAt |
string |
UTC timestamp when the task started. |
Status |
Current status of the task instance. |
|
TaskIdentifier |
Identifier of the task this instance belongs to. |
|
TaskInstanceId |
string |
ID of the task instance. |
ExecuteCloudScriptResult
Name | Type | Description |
---|---|---|
APIRequestsIssued |
number |
Number of PlayFab API requests issued by the CloudScript function |
Error |
Information about the error, if any, that occurred during execution |
|
ExecutionTimeSeconds |
number |
|
FunctionName |
string |
The name of the function that executed |
FunctionResult |
object |
The object returned from the CloudScript function, if any |
FunctionResultTooLarge |
boolean |
Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if the total event size is larger than 350KB. |
HttpRequestsIssued |
number |
Number of external HTTP requests issued by the CloudScript function |
Logs |
Entries logged during the function execution. These include both entries logged in the function code using log.info() and log.error() and error entries for API and HTTP request failures. |
|
LogsTooLarge |
boolean |
Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total event size is larger than 350KB after the FunctionResult was removed. |
MemoryConsumedBytes |
number |
|
ProcessorTimeSeconds |
number |
Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP requests. |
Revision |
number |
The revision of the CloudScript that executed |
GetCloudScriptTaskInstanceResult
Name | Type | Description |
---|---|---|
Parameter |
Parameter of this task instance |
|
Summary |
Status summary of the CloudScript task instance |
GetTaskInstanceRequest
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.
Name | Type | Description |
---|---|---|
TaskInstanceId |
string |
ID of the requested task instance. |
LogStatement
Name | Type | Description |
---|---|---|
Data |
object |
Optional object accompanying the message as contextual information |
Level |
string |
'Debug', 'Info', or 'Error' |
Message |
string |
NameIdentifier
Identifier by either name or ID. Note that a name may change due to renaming, or reused after being deleted. ID is immutable and unique.
Name | Type | Description |
---|---|---|
Id |
string |
Id Identifier, if present |
Name |
string |
Name Identifier, if present |
ScriptExecutionError
Name | Type | Description |
---|---|---|
Error |
string |
Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded, CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError |
Message |
string |
Details about the error |
StackTrace |
string |
Point during the execution of the script at which the error occurred, if any |
TaskInstanceStatus
Name | Type | Description |
---|---|---|
Aborted |
string |
|
Failed |
string |
|
InProgress |
string |
|
Stalled |
string |
|
Starting |
string |
|
Succeeded |
string |
Error Codes
Name | Code |
---|---|
TaskInstanceNotFound | 1262 |