Class Script


public class Script extends ScriptDeprecated
This file was automatically generated.
  • Constructor Details

  • Method Details

    • listEngines

      public ApiResponse listEngines() throws ClientApiException
      Lists the script engines available

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • listTypes

      public ApiResponse listTypes() throws ClientApiException
      Lists the script types available.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • listScripts

      public ApiResponse listScripts() throws ClientApiException
      Lists the scripts available, with its engine, name, description, type and error state.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • globalVar

      public ApiResponse globalVar(String varkey) throws ClientApiException
      Gets the value of the global variable with the given key. Returns an API error (DOES_NOT_EXIST) if no value was previously set.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • globalCustomVar

      public ApiResponse globalCustomVar(String varkey) throws ClientApiException
      Gets the value (string representation) of a global custom variable. Returns an API error (DOES_NOT_EXIST) if no value was previously set.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • globalVars

      public ApiResponse globalVars() throws ClientApiException
      Gets all the global variables (key/value pairs).

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • globalCustomVars

      public ApiResponse globalCustomVars() throws ClientApiException
      Gets all the global custom variables (key/value pairs, the value is the string representation).

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • scriptVar

      public ApiResponse scriptVar(String scriptname, String varkey) throws ClientApiException
      Gets the value of the variable with the given key for the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists or if no value was previously set.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • scriptCustomVar

      public ApiResponse scriptCustomVar(String scriptname, String varkey) throws ClientApiException
      Gets the value (string representation) of a custom variable. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists or if no value was previously set.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • scriptVars

      public ApiResponse scriptVars(String scriptname) throws ClientApiException
      Gets all the variables (key/value pairs) of the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • scriptCustomVars

      public ApiResponse scriptCustomVars(String scriptname) throws ClientApiException
      Gets all the custom variables (key/value pairs, the value is the string representation) of a script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • enable

      public ApiResponse enable(String scriptname) throws ClientApiException
      Enables the script with the given name

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • disable

      public ApiResponse disable(String scriptname) throws ClientApiException
      Disables the script with the given name

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • load

      public ApiResponse load(String scriptname, String scripttype, String scriptengine, String filename, String scriptdescription, Charset charset) throws ClientApiException
      Loads a script into ZAP from the given local file, with the given name, type and engine, optionally with a description, and a charset name to read the script (the charset name is required if the script is not in UTF-8, for example, in ISO-8859-1).

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • remove

      public ApiResponse remove(String scriptname) throws ClientApiException
      Removes the script with the given name

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • runStandAloneScript

      public ApiResponse runStandAloneScript(String scriptname) throws ClientApiException
      Runs the stand alone script with the given name

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • clearGlobalVar

      public ApiResponse clearGlobalVar(String varkey) throws ClientApiException
      Clears the global variable with the given key.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • clearGlobalCustomVar

      public ApiResponse clearGlobalCustomVar(String varkey) throws ClientApiException
      Clears a global custom variable.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • clearGlobalVars

      public ApiResponse clearGlobalVars() throws ClientApiException
      Clears the global variables.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • clearScriptVar

      public ApiResponse clearScriptVar(String scriptname, String varkey) throws ClientApiException
      Clears the variable with the given key of the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • clearScriptCustomVar

      public ApiResponse clearScriptCustomVar(String scriptname, String varkey) throws ClientApiException
      Clears a script custom variable.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • clearScriptVars

      public ApiResponse clearScriptVars(String scriptname) throws ClientApiException
      Clears the variables of the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • setScriptVar

      public ApiResponse setScriptVar(String scriptname, String varkey, String varvalue) throws ClientApiException
      Sets the value of the variable with the given key of the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException
    • setGlobalVar

      public ApiResponse setGlobalVar(String varkey, String varvalue) throws ClientApiException
      Sets the value of the global variable with the given key.

      This component is optional and therefore the API will only work if it is installed

      Throws:
      ClientApiException