다음을 통해 공유


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

ExecuteFunctionResult

The result of the function execution

ScheduledTaskId True

NameIdentifier

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

EmptyResult

400 Bad Request

ApiErrorWrapper

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
ApiErrorWrapper

The basic wrapper around every failed API response

EmptyResult
ExecuteFunctionResult
FunctionExecutionError
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.

PostFunctionResultForScheduledTaskRequest

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

FunctionExecutionError

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

ExecuteFunctionResult

The result of the function execution

ScheduledTaskId

NameIdentifier

The id of the scheduled task that invoked the function.