Server-Side Cloud Script - Update Cloud Script
Creates a new Cloud Script revision and uploads source code to it. Note that at this time, only one file should be submitted in the revision.
POST https://titleId.playfabapi.com/Admin/UpdateCloudScript
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-SecretKey | True |
|
This API requires a title secret key, available to title admins, from PlayFab Game Manager. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
Files | True |
List of Cloud Script files to upload to create the new revision. Must have at least one file. |
|
Publish | True |
|
Immediately publish the new revision |
CustomTags |
|
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
|
DeveloperPlayFabId |
|
PlayFab user ID of the developer initiating the request. |
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
Api |
The basic wrapper around every failed API response |
Cloud |
|
Update |
|
Update |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
|
Numerical HTTP code |
error |
|
Playfab error code |
errorCode |
|
Numerical PlayFab error code |
errorDetails |
|
Detailed description of individual issues with the request object |
errorMessage |
|
Description for the PlayFab errorCode |
status |
|
String HTTP code |
CloudScriptFile
Name | Type | Description |
---|---|---|
FileContents |
|
Contents of the Cloud Script javascript. Must be string-escaped javascript. |
Filename |
|
Name of the javascript file. These names are not used internally by the server, they are only for developer organizational purposes. |
UpdateCloudScriptRequest
Name | Type | Description |
---|---|---|
CustomTags |
|
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). |
DeveloperPlayFabId |
|
PlayFab user ID of the developer initiating the request. |
Files |
List of Cloud Script files to upload to create the new revision. Must have at least one file. |
|
Publish |
|
Immediately publish the new revision |
UpdateCloudScriptResult
Name | Type | Description |
---|---|---|
Revision |
|
New revision number created |
Version |
|
Cloud Script version updated |
Error Codes
Name | Code |
---|---|
JavascriptException | 1099 |