Package org.zaproxy.clientapi.gen
Class Script
- java.lang.Object
-
- org.zaproxy.clientapi.gen.deprecated.ScriptDeprecated
-
- org.zaproxy.clientapi.gen.Script
-
public class Script extends ScriptDeprecated
This file was automatically generated.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiResponseclearGlobalCustomVar(java.lang.String varkey)Clears a global custom variable.ApiResponseclearGlobalVar(java.lang.String varkey)Clears the global variable with the given key.ApiResponseclearGlobalVars()Clears the global variables.ApiResponseclearScriptCustomVar(java.lang.String scriptname, java.lang.String varkey)Clears a script custom variable.ApiResponseclearScriptVar(java.lang.String scriptname, java.lang.String varkey)Clears the variable with the given key of the given script.ApiResponseclearScriptVars(java.lang.String scriptname)Clears the variables of the given script.ApiResponsedisable(java.lang.String scriptname)Disables the script with the given nameApiResponseenable(java.lang.String scriptname)Enables the script with the given nameApiResponseglobalCustomVar(java.lang.String varkey)Gets the value (string representation) of a global custom variable.ApiResponseglobalCustomVars()Gets all the global custom variables (key/value pairs, the value is the string representation).ApiResponseglobalVar(java.lang.String varkey)Gets the value of the global variable with the given key.ApiResponseglobalVars()Gets all the global variables (key/value pairs).ApiResponselistEngines()Lists the script engines availableApiResponselistScripts()Lists the scripts available, with its engine, name, description, type and error state.ApiResponselistTypes()Lists the script types available.ApiResponseload(java.lang.String scriptname, java.lang.String scripttype, java.lang.String scriptengine, java.lang.String filename, java.lang.String scriptdescription, java.nio.charset.Charset charset)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).ApiResponseremove(java.lang.String scriptname)Removes the script with the given nameApiResponserunStandAloneScript(java.lang.String scriptname)Runs the stand alone script with the given nameApiResponsescriptCustomVar(java.lang.String scriptname, java.lang.String varkey)Gets the value (string representation) of a custom variable.ApiResponsescriptCustomVars(java.lang.String scriptname)Gets all the custom variables (key/value pairs, the value is the string representation) of a script.ApiResponsescriptVar(java.lang.String scriptname, java.lang.String varkey)Gets the value of the variable with the given key for the given script.ApiResponsescriptVars(java.lang.String scriptname)Gets all the variables (key/value pairs) of the given script.ApiResponsesetGlobalVar(java.lang.String varkey, java.lang.String varvalue)Sets the value of the global variable with the given key.ApiResponsesetScriptVar(java.lang.String scriptname, java.lang.String varkey, java.lang.String varvalue)Sets the value of the variable with the given key of the given script.-
Methods inherited from class org.zaproxy.clientapi.gen.deprecated.ScriptDeprecated
disable, enable, load, load, remove, runStandAloneScript
-
-
-
-
Constructor Detail
-
Script
public Script(ClientApi api)
-
-
Method Detail
-
listEngines
public ApiResponse listEngines() throws ClientApiException
Lists the script engines available- Throws:
ClientApiException
-
listTypes
public ApiResponse listTypes() throws ClientApiException
Lists the script types available.- Throws:
ClientApiException
-
listScripts
public ApiResponse listScripts() throws ClientApiException
Lists the scripts available, with its engine, name, description, type and error state.- Throws:
ClientApiException
-
globalVar
public ApiResponse globalVar(java.lang.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.- Throws:
ClientApiException
-
globalCustomVar
public ApiResponse globalCustomVar(java.lang.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.- Throws:
ClientApiException
-
globalVars
public ApiResponse globalVars() throws ClientApiException
Gets all the global variables (key/value pairs).- Throws:
ClientApiException
-
globalCustomVars
public ApiResponse globalCustomVars() throws ClientApiException
Gets all the global custom variables (key/value pairs, the value is the string representation).- Throws:
ClientApiException
-
scriptVar
public ApiResponse scriptVar(java.lang.String scriptname, java.lang.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.- Throws:
ClientApiException
-
scriptCustomVar
public ApiResponse scriptCustomVar(java.lang.String scriptname, java.lang.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.- Throws:
ClientApiException
-
scriptVars
public ApiResponse scriptVars(java.lang.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.- Throws:
ClientApiException
-
scriptCustomVars
public ApiResponse scriptCustomVars(java.lang.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.- Throws:
ClientApiException
-
enable
public ApiResponse enable(java.lang.String scriptname) throws ClientApiException
Enables the script with the given name- Throws:
ClientApiException
-
disable
public ApiResponse disable(java.lang.String scriptname) throws ClientApiException
Disables the script with the given name- Throws:
ClientApiException
-
load
public ApiResponse load(java.lang.String scriptname, java.lang.String scripttype, java.lang.String scriptengine, java.lang.String filename, java.lang.String scriptdescription, java.nio.charset.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).- Throws:
ClientApiException
-
remove
public ApiResponse remove(java.lang.String scriptname) throws ClientApiException
Removes the script with the given name- Throws:
ClientApiException
-
runStandAloneScript
public ApiResponse runStandAloneScript(java.lang.String scriptname) throws ClientApiException
Runs the stand alone script with the given name- Throws:
ClientApiException
-
clearGlobalVar
public ApiResponse clearGlobalVar(java.lang.String varkey) throws ClientApiException
Clears the global variable with the given key.- Throws:
ClientApiException
-
clearGlobalCustomVar
public ApiResponse clearGlobalCustomVar(java.lang.String varkey) throws ClientApiException
Clears a global custom variable.- Throws:
ClientApiException
-
clearGlobalVars
public ApiResponse clearGlobalVars() throws ClientApiException
Clears the global variables.- Throws:
ClientApiException
-
clearScriptVar
public ApiResponse clearScriptVar(java.lang.String scriptname, java.lang.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.- Throws:
ClientApiException
-
clearScriptCustomVar
public ApiResponse clearScriptCustomVar(java.lang.String scriptname, java.lang.String varkey) throws ClientApiException
Clears a script custom variable.- Throws:
ClientApiException
-
clearScriptVars
public ApiResponse clearScriptVars(java.lang.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.- Throws:
ClientApiException
-
setScriptVar
public ApiResponse setScriptVar(java.lang.String scriptname, java.lang.String varkey, java.lang.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.- Throws:
ClientApiException
-
setGlobalVar
public ApiResponse setGlobalVar(java.lang.String varkey, java.lang.String varvalue) throws ClientApiException
Sets the value of the global variable with the given key.- Throws:
ClientApiException
-
-