ZAP API UI

Component: script

Views

globalCustomVar (varKey* ) Gets the value (string representation) of a global custom variable. Returns an API error (DOES_NOT_EXIST) if no value was previously set.
globalCustomVarsGets all the global custom variables (key/value pairs, the value is the string representation).
globalVar (varKey* ) Gets the value of the global variable with the given key. Returns an API error (DOES_NOT_EXIST) if no value was previously set.
globalVarsGets all the global variables (key/value pairs).
listEnginesLists the script engines available
listScriptsLists the scripts available, with its engine, name, description, type and error state.
listTypesLists the script types available.
scriptCustomVar (scriptName* varKey* ) 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.
scriptCustomVars (scriptName* ) 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.
scriptVar (scriptName* varKey* ) 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.
scriptVars (scriptName* ) 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.

Actions

clearGlobalCustomVar (varKey* ) Clears a global custom variable.
clearGlobalVar (varKey* ) Clears the global variable with the given key.
clearGlobalVarsClears the global variables.
clearScriptCustomVar (scriptName* varKey* ) Clears a script custom variable.
clearScriptVar (scriptName* varKey* ) 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.
clearScriptVars (scriptName* ) Clears the variables of the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists.
disable (scriptName* ) Disables the script with the given name
enable (scriptName* ) Enables the script with the given name
load (scriptName* scriptType* scriptEngine* fileName* scriptDescription 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).
remove (scriptName* ) Removes the script with the given name
runStandAloneScript (scriptName* ) Runs the stand alone script with the given name
setGlobalVar (varKey* varValue ) Sets the value of the global variable with the given key.
setScriptVar (scriptName* varKey* varValue ) 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.