Server-Side Cloud Script - Post Function Result For Scheduled Task
Generate a PlayStream event for the provided function result.
POST https://titleId.playfabapi.com/CloudScript/PostFunctionResultForScheduledTask
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-EntityToken | True |
string |
This API requires an Entity Session Token, available from the Entity GetEntityToken method. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
FunctionResult | True |
The result of the function execution |
|
ScheduledTaskId | True |
The id of the scheduled task that invoked the function. |
|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-EntityToken
This API requires an Entity Session Token, available from the Entity GetEntityToken method.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Api |
The basic wrapper around every failed API response |
Empty |
|
Execute |
|
Function |
|
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. |
Post |
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 |
EmptyResult
ExecuteFunctionResult
Name | Type | Description |
---|---|---|
Error |
Error from the CloudScript Azure Function. |
|
ExecutionTimeMilliseconds |
number |
The amount of time the function took to execute |
FunctionName |
string |
The name of the function that executed |
FunctionResult |
object |
The object returned from the function, if any |
FunctionResultTooLarge |
boolean |
Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. |
FunctionExecutionError
Name | Type | Description |
---|---|---|
Error |
string |
Error code, such as CloudScriptAzureFunctionsExecutionTimeLimitExceeded, CloudScriptAzureFunctionsArgumentSizeExceeded, CloudScriptAzureFunctionsReturnSizeExceeded or CloudScriptAzureFunctionsHTTPRequestError |
Message |
string |
Details about the error |
StackTrace |
string |
Point during the execution of the function at which the error occurred, if any |
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 |
PostFunctionResultForScheduledTaskRequest
Name | Type | Description |
---|---|---|
CustomTags |
object |
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
FunctionResult |
The result of the function execution |
|
ScheduledTaskId |
The id of the scheduled task that invoked the function. |