Serverscript Common APIs


Execute Script

Use this method to execute the script that is provided input.

Syntax: $s.executeScript(script)

Parameters:

  • script: (string) The script to execute.

Exception: Throws error if there is any issue in the script execution.

Get Parameter

Use this method to get the parameter value from the request.

Syntax: $s.getParameter(parameterKey)

Parameters:

  • parameterKey: (string) The key name of the parameter.

Return: String

Get Part

Use this method to read binary data from request as StudioBlob at specified key.

Syntax: $s.getPart(parameterKey)

Parameters:

  • parameterKey: (string) The key name of the part parameter.

Return: StudioBlob

Exception: Throws error if there is any issue in converting part value to StudioBlob or reading the part value from request.