Execute Entity Cloud Script
Cloud Script is one of PlayFab’s most versatile features. It allows client code to request execution of any kind of custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| CloudScriptAPIRequestCountExceeded | 1209 |
| CloudScriptAPIRequestError | 1210 |
| CloudScriptFunctionArgumentSizeExceeded | 1208 |
| CloudScriptHTTPRequestError | 1211 |
| CloudScriptNotFound | 1136 |
| InvalidEntityType | 1373 |
| JavascriptException | 1099 |
| TitleDeleted | 1347 |
Authorizations
This API requires an Entity Session Token, available from the Entity GetEntityToken method.
Body
Executes CloudScript with the entity profile that is defined in the request.
Executes CloudScript with the entity profile that is defined in the request.
The name of the CloudScript function to execute
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
The optional entity to perform this action on. Defaults to the currently logged in entity.
Object that is passed in to the function as the first argument
Generate a 'entity_executed_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager.
Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpecificRevision parameter is specified, otherwise it is 'Live'.
Live, Latest, Specific The specific revision to execute, when RevisionSelection is set to 'Specific'
