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
  • string

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
  • boolean

Immediately publish the new revision

CustomTags
  • object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

DeveloperPlayFabId
  • string

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

ApiErrorWrapper

The basic wrapper around every failed API response

CloudScriptFile
UpdateCloudScriptRequest
UpdateCloudScriptResult

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

CloudScriptFile

Name Type Description
FileContents
  • string

Contents of the Cloud Script javascript. Must be string-escaped javascript.

Filename
  • string

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
  • object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

DeveloperPlayFabId
  • string

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
  • boolean

Immediately publish the new revision

UpdateCloudScriptResult

Name Type Description
Revision
  • number

New revision number created

Version
  • number

Cloud Script version updated

Error Codes

Name Code
JavascriptException 1099