Scheduled Task - Get Task Instances
Query for task instances by task, status, or time range.
POST https://titleId.playfabapi.com/Admin/GetTaskInstances
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 | Type | Description |
---|---|---|
StartedAtRangeFrom |
string |
Optional range-from filter for task instances' StartedAt timestamp. |
StartedAtRangeTo |
string |
Optional range-to filter for task instances' StartedAt timestamp. |
StatusFilter |
Optional filter for task instances that are of a specific status. |
|
TaskIdentifier |
Name or ID of the task whose instances are being queried. If not specified, return all task instances that satisfy conditions set by other filters. |
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 |
Get |
Only the most recent 100 task instances are returned, ordered by start time descending. The results are generic basic information for task instances. To get detail information specific to each task type, use Get*TaskInstance based on its corresponding task type. |
Get |
|
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. |
Scheduled |
|
Task |
|
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 |
GetTaskInstancesRequest
Only the most recent 100 task instances are returned, ordered by start time descending. The results are generic basic information for task instances. To get detail information specific to each task type, use Get*TaskInstance based on its corresponding task type.
Name | Type | Description |
---|---|---|
StartedAtRangeFrom |
string |
Optional range-from filter for task instances' StartedAt timestamp. |
StartedAtRangeTo |
string |
Optional range-to filter for task instances' StartedAt timestamp. |
StatusFilter |
Optional filter for task instances that are of a specific status. |
|
TaskIdentifier |
Name or ID of the task whose instances are being queried. If not specified, return all task instances that satisfy conditions set by other filters. |
GetTaskInstancesResult
Name | Type | Description |
---|---|---|
Summaries |
Basic status summaries of the queried task instances. Empty If no task instances meets the filter criteria. To get detailed status summary, use Get*TaskInstance API according to task type (e.g. GetActionsOnPlayersInSegmentTaskInstance). |
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 |
ScheduledTaskType
Name | Type | Description |
---|---|---|
ActionsOnPlayerSegment |
string |
|
CloudScript |
string |
|
CloudScriptAzureFunctions |
string |
|
InsightsScheduledScaling |
string |
TaskInstanceBasicSummary
Name | Type | Description |
---|---|---|
CompletedAt |
string |
UTC timestamp when the task completed. |
ErrorMessage |
string |
Error message for last processing attempt, if an error occured. |
EstimatedSecondsRemaining |
number |
Estimated time remaining in seconds. |
PercentComplete |
number |
Progress represented as percentage. |
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. |
Type |
Type of the task. |
TaskInstanceStatus
Name | Type | Description |
---|---|---|
Aborted |
string |
|
Failed |
string |
|
InProgress |
string |
|
Stalled |
string |
|
Starting |
string |
|
Succeeded |
string |
Error Codes
Name | Code |
---|---|
TaskNotFound | 1261 |