Package org.zaproxy.clientapi.gen
Class Core
java.lang.Object
org.zaproxy.clientapi.gen.deprecated.CoreDeprecated
org.zaproxy.clientapi.gen.Core
This file was automatically generated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvenient and simple action to access a URL, optionally following redirections.addProxyChainExcludedDomain
(String value, String isregex, String isenabled) Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Deprecated.Use the API endpoint with the same name in the 'alert' component instead.alertsSummary
(String baseurl) Deprecated.Use the API endpoint with the same name in the 'alert' component instead.childNodes
(String url) Gets the child nodes underneath the specified URL in the Sites treeClears the regexes of URLs excluded from the local proxies.createSbomZip
(String filepath) Create a zip file of the ZAP core and add-on SBOMsdeleteAlert
(String id) Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Deprecated.Use the API endpoint with the same name in the 'alert' component instead.deleteSiteNode
(String url, String method, String postdata) Deletes the site node found in the Sites Tree on the basis of the URL, HTTP method, and post data (if applicable and specified).Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.enablePKCS12ClientCertificate
(String filepath, String password, String index) Deprecated.Use the API endpoints in the 'network' component instead.Gets the regular expressions, applied to URLs, to exclude from the local proxies.excludeFromProxy
(String regex) Adds a regex of URLs that should be excluded from the local proxies.byte[]
fileDownload
(String filename) Download a file from the transfer directorybyte[]
fileUpload
(String filename, String filecontents) Upload a file to the transfer directory.Deprecated.Use the API endpoints in the 'network' component instead.getLogLevel
(String name) The detailed logging config, optionally filtered based on a name (ex: starts with).Deprecated.hosts()
Gets the name of the hosts accessed through/by ZAPbyte[]
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.byte[]
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.loadSession
(String name) Loads the session with the given name.byte[]
mdreport()
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.Gets the HTTP message with the given ID.byte[]
messageHar
(String id) Deprecated.Use the API endpoints in the 'exim' add-on instead.Gets the HTTP messages sent by ZAP, request and response, optionally filtered by URL and paginated with 'start' position and 'count' of messagesmessagesById
(String ids) Gets the HTTP messages with the given IDs.byte[]
messagesHar
(String baseurl, String start, String count) Deprecated.Use the API endpoints in the 'exim' add-on instead.byte[]
messagesHarById
(String ids) Deprecated.Use the API endpoints in the 'exim' add-on instead.mode()
Gets the modemodifyProxyChainExcludedDomain
(String idx, String value, String isregex, String isenabled) Deprecated.Use the API endpoints in the 'network' component instead.newSession
(String name, String overwrite) Creates a new session, optionally overwriting existing files.numberOfAlerts
(String baseurl, String riskid) Deprecated.Use the API endpoint with the same name in the 'alert' component instead.numberOfMessages
(String baseurl) Gets the number of messages, optionally filtering by URLGets the path to the file with alert overrides.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Gets the maximum number of alert instances to include in a report.Gets whether or not related alerts will be merged in any reports generated.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Deprecated.Deprecated.Option no longer in effective use.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.byte[]
proxypac()
Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.byte[]
rootcert()
Deprecated.Use the API endpoints in the 'network' component instead.saveSession
(String name, String overwrite) Saves the session.byte[]
sendHarRequest
(String request, String followredirects) Deprecated.Use the API endpoints in the 'exim' add-on instead.sendRequest
(String request, String followredirects) Sends the HTTP request, optionally following redirections.Gets the location of the current session filesetHomeDirectory
(String dir) setLogLevel
(String name, String loglevel) Sets the logging level for a given logger name.Sets the mode, which may be one of [safe, protect, standard, attack]setOptionAlertOverridesFilePath
(String filepath) Sets (or clears, if empty) the path to the file with alert overrides.setOptionDefaultUserAgent
(String string) Deprecated.Use the API endpoints in the 'network' component instead.Deprecated.Use the API endpoints in the 'network' component instead.setOptionHttpStateEnabled
(boolean bool) Deprecated.Use the API endpoints in the 'network' component instead.setOptionMaximumAlertInstances
(String numberofinstances) Sets the maximum number of alert instances to include in a report.setOptionMergeRelatedAlerts
(String enabled) Sets whether or not related alerts will be merged in any reports generated.setOptionProxyChainName
(String string) Deprecated.Use the API endpoints in the 'network' component instead.setOptionProxyChainPassword
(String string) Deprecated.Use the API endpoints in the 'network' component instead.setOptionProxyChainPort
(int i) Deprecated.Use the API endpoints in the 'network' component instead.setOptionProxyChainPrompt
(boolean bool) Deprecated.Use the API endpoints in the 'network' component instead.setOptionProxyChainRealm
(String string) Deprecated.Use the API endpoints in the 'network' component instead.setOptionProxyChainSkipName
(String string) Deprecated.Option no longer in effective use.setOptionProxyChainUserName
(String string) Deprecated.Use the API endpoints in the 'network' component instead.setOptionSingleCookieRequestHeader
(boolean bool) Deprecated.Option no longer in effective use.setOptionTimeoutInSecs
(int i) Deprecated.Use the API endpoints in the 'network' component instead.setOptionUseProxyChain
(boolean bool) Deprecated.Use the API endpoints in the 'network' component instead.setOptionUseProxyChainAuth
(boolean bool) Deprecated.Use the API endpoints in the 'network' component instead.setOptionUseSocksProxy
(boolean bool) Deprecated.Use the API endpoints in the 'network' component instead.byte[]
Deprecated.Use the API endpoints in the 'network' component instead.shutdown()
Shuts down ZAPsites()
Gets the sites accessed through/by ZAP (scheme and domain)snapshotSession
(String name, String overwrite) Snapshots the session, optionally with the given name, and overwriting existing files.Gets the URLs accessed through/by ZAP, optionally filtering by (base) URL.version()
Gets ZAP versionbyte[]
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.Gets the path to ZAP's home directory.Methods inherited from class org.zaproxy.clientapi.gen.deprecated.CoreDeprecated
accessUrl, alerts, clearExcludedFromProxy, deleteAllAlerts, deleteSiteNode, excludeFromProxy, generateRootCA, htmlreport, loadSession, messageHar, messagesHar, newSession, numberOfAlerts, proxypac, rootcert, runGarbageCollection, saveSession, sendHarRequest, sendRequest, setHomeDirectory, setMode, setOptionDefaultUserAgent, setOptionHttpStateEnabled, setOptionProxyChainName, setOptionProxyChainPassword, setOptionProxyChainPort, setOptionProxyChainPrompt, setOptionProxyChainRealm, setOptionProxyChainSkipName, setOptionProxyChainUserName, setOptionSingleCookieRequestHeader, setOptionTimeoutInSecs, setOptionUseProxyChain, setOptionUseProxyChainAuth, setproxy, shutdown, snapshotSession, snapshotSession, urls, xmlreport
-
Constructor Details
-
Core
-
-
Method Details
-
hosts
Gets the name of the hosts accessed through/by ZAP- Throws:
ClientApiException
-
sites
Gets the sites accessed through/by ZAP (scheme and domain)- Throws:
ClientApiException
-
urls
Gets the URLs accessed through/by ZAP, optionally filtering by (base) URL.- Throws:
ClientApiException
-
childNodes
Gets the child nodes underneath the specified URL in the Sites tree- Throws:
ClientApiException
-
message
Gets the HTTP message with the given ID. Returns the ID, request/response headers and bodies, cookies, note, type, RTT, and timestamp.- Throws:
ClientApiException
-
messages
Gets the HTTP messages sent by ZAP, request and response, optionally filtered by URL and paginated with 'start' position and 'count' of messages- Throws:
ClientApiException
-
messagesById
Gets the HTTP messages with the given IDs.- Throws:
ClientApiException
-
numberOfMessages
Gets the number of messages, optionally filtering by URL- Throws:
ClientApiException
-
mode
Gets the mode- Throws:
ClientApiException
-
version
Gets ZAP version- Throws:
ClientApiException
-
excludedFromProxy
Gets the regular expressions, applied to URLs, to exclude from the local proxies.- Throws:
ClientApiException
-
sessionLocation
Gets the location of the current session file- Throws:
ClientApiException
-
proxyChainExcludedDomains
Deprecated.Use the API endpoints in the 'network' component instead.Gets all the domains that are excluded from the outgoing proxy. For each domain the following are shown: the index, the value (domain), if enabled, and if specified as a regex.- Throws:
ClientApiException
-
zapHomePath
Gets the path to ZAP's home directory.- Throws:
ClientApiException
-
optionMaximumAlertInstances
Gets the maximum number of alert instances to include in a report.- Throws:
ClientApiException
-
optionMergeRelatedAlerts
Gets whether or not related alerts will be merged in any reports generated.- Throws:
ClientApiException
-
optionAlertOverridesFilePath
Gets the path to the file with alert overrides.- Throws:
ClientApiException
-
homeDirectory
Deprecated.- Throws:
ClientApiException
-
optionProxyChainSkipName
Deprecated.Use view proxyChainExcludedDomains instead.- Throws:
ClientApiException
-
optionProxyExcludedDomains
Deprecated.Use view proxyChainExcludedDomains instead.- Throws:
ClientApiException
-
optionProxyExcludedDomainsEnabled
Deprecated.Use view proxyChainExcludedDomains instead.- Throws:
ClientApiException
-
alert
Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Gets the alert with the given ID, the corresponding HTTP message can be obtained with the 'messageId' field and 'message' API method- Throws:
ClientApiException
-
alerts
@Deprecated public ApiResponse alerts(String baseurl, String start, String count, String riskid) throws ClientApiException Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Gets the alerts raised by ZAP, optionally filtering by URL or riskId, and paginating with 'start' position and 'count' of alerts- Throws:
ClientApiException
-
alertsSummary
Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Gets number of alerts grouped by each risk level, optionally filtering by URL- Throws:
ClientApiException
-
numberOfAlerts
@Deprecated public ApiResponse numberOfAlerts(String baseurl, String riskid) throws ClientApiException Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Gets the number of alerts, optionally filtering by URL or riskId- Throws:
ClientApiException
-
getLogLevel
The detailed logging config, optionally filtered based on a name (ex: starts with).- Throws:
ClientApiException
-
optionDefaultUserAgent
Deprecated.Use the API endpoints in the 'network' component instead.Gets the user agent that ZAP should use when creating HTTP messages (for example, spider messages or CONNECT requests to outgoing proxy).- Throws:
ClientApiException
-
optionDnsTtlSuccessfulQueries
Deprecated.Use the API endpoints in the 'network' component instead.Gets the TTL (in seconds) of successful DNS queries.- Throws:
ClientApiException
-
optionHttpState
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionHttpStateEnabled
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionProxyChainName
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionProxyChainPassword
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionProxyChainPort
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionProxyChainPrompt
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionProxyChainRealm
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionProxyChainUserName
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionSingleCookieRequestHeader
Deprecated.Option no longer in effective use.- Throws:
ClientApiException
-
optionTimeoutInSecs
Deprecated.Use the API endpoints in the 'network' component instead.Gets the connection time out (in seconds).- Throws:
ClientApiException
-
optionUseProxyChain
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionUseProxyChainAuth
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
optionUseSocksProxy
Deprecated.Use the API endpoints in the 'network' component instead.Gets whether or not the SOCKS proxy should be used.- Throws:
ClientApiException
-
accessUrl
Convenient and simple action to access a URL, optionally following redirections. Returns the request sent and response received and followed redirections, if any. Other actions are available which offer more control on what is sent, like, 'sendRequest' or 'sendHarRequest'.- Throws:
ClientApiException
-
shutdown
Shuts down ZAP- Throws:
ClientApiException
-
newSession
Creates a new session, optionally overwriting existing files. If a relative path is specified it will be resolved against the "session" directory in ZAP "home" dir.- Throws:
ClientApiException
-
loadSession
Loads the session with the given name. If a relative path is specified it will be resolved against the "session" directory in ZAP "home" dir.- Throws:
ClientApiException
-
saveSession
Saves the session.- Throws:
ClientApiException
-
snapshotSession
Snapshots the session, optionally with the given name, and overwriting existing files. If no name is specified the name of the current session with a timestamp appended is used. If a relative path is specified it will be resolved against the "session" directory in ZAP "home" dir.- Throws:
ClientApiException
-
clearExcludedFromProxy
Clears the regexes of URLs excluded from the local proxies.- Throws:
ClientApiException
-
excludeFromProxy
Adds a regex of URLs that should be excluded from the local proxies.- Throws:
ClientApiException
-
setHomeDirectory
- Throws:
ClientApiException
-
setMode
Sets the mode, which may be one of [safe, protect, standard, attack]- Throws:
ClientApiException
-
generateRootCA
Deprecated.Use the API endpoints in the 'network' component instead.Generates a new Root CA certificate for the local proxies.- Throws:
ClientApiException
-
sendRequest
Sends the HTTP request, optionally following redirections. Returns the request sent and response received and followed redirections, if any. The Mode is enforced when sending the request (and following redirections), custom manual requests are not allowed in 'Safe' mode nor in 'Protected' mode if out of scope.- Throws:
ClientApiException
-
runGarbageCollection
- Throws:
ClientApiException
-
deleteSiteNode
public ApiResponse deleteSiteNode(String url, String method, String postdata) throws ClientApiException Deletes the site node found in the Sites Tree on the basis of the URL, HTTP method, and post data (if applicable and specified).- Throws:
ClientApiException
-
addProxyChainExcludedDomain
@Deprecated public ApiResponse addProxyChainExcludedDomain(String value, String isregex, String isenabled) throws ClientApiException Deprecated.Use the API endpoints in the 'network' component instead.Adds a domain to be excluded from the outgoing proxy, using the specified value. Optionally sets if the new entry is enabled (default, true) and whether or not the new value is specified as a regex (default, false).- Throws:
ClientApiException
-
modifyProxyChainExcludedDomain
@Deprecated public ApiResponse modifyProxyChainExcludedDomain(String idx, String value, String isregex, String isenabled) throws ClientApiException Deprecated.Use the API endpoints in the 'network' component instead.Modifies a domain excluded from the outgoing proxy. Allows to modify the value, if enabled or if a regex. The domain is selected with its index, which can be obtained with the view proxyChainExcludedDomains.- Throws:
ClientApiException
-
removeProxyChainExcludedDomain
Deprecated.Use the API endpoints in the 'network' component instead.Removes a domain excluded from the outgoing proxy, with the given index. The index can be obtained with the view proxyChainExcludedDomains.- Throws:
ClientApiException
-
enableAllProxyChainExcludedDomains
Deprecated.Use the API endpoints in the 'network' component instead.Enables all domains excluded from the outgoing proxy.- Throws:
ClientApiException
-
disableAllProxyChainExcludedDomains
Deprecated.Use the API endpoints in the 'network' component instead.Disables all domains excluded from the outgoing proxy.- Throws:
ClientApiException
-
setOptionMaximumAlertInstances
public ApiResponse setOptionMaximumAlertInstances(String numberofinstances) throws ClientApiException Sets the maximum number of alert instances to include in a report. A value of zero is treated as unlimited.- Throws:
ClientApiException
-
setOptionMergeRelatedAlerts
Sets whether or not related alerts will be merged in any reports generated.- Throws:
ClientApiException
-
setOptionAlertOverridesFilePath
Sets (or clears, if empty) the path to the file with alert overrides.- Throws:
ClientApiException
-
enablePKCS12ClientCertificate
@Deprecated public ApiResponse enablePKCS12ClientCertificate(String filepath, String password, String index) throws ClientApiException Deprecated.Use the API endpoints in the 'network' component instead.Enables use of a PKCS12 client certificate for the certificate with the given file system path, password, and optional index.- Throws:
ClientApiException
-
disableClientCertificate
Deprecated.Use the API endpoints in the 'network' component instead.Disables the option for use of client certificates.- Throws:
ClientApiException
-
createSbomZip
Create a zip file of the ZAP core and add-on SBOMs- Throws:
ClientApiException
-
deleteAllAlerts
Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Deletes all alerts of the current session.- Throws:
ClientApiException
-
deleteAlert
Deprecated.Use the API endpoint with the same name in the 'alert' component instead.Deletes the alert with the given ID.- Throws:
ClientApiException
-
setLogLevel
Sets the logging level for a given logger name.- Throws:
ClientApiException
-
setOptionDefaultUserAgent
Deprecated.Use the API endpoints in the 'network' component instead.Sets the user agent that ZAP should use when creating HTTP messages (for example, spider messages or CONNECT requests to outgoing proxy).- Throws:
ClientApiException
-
setOptionDnsTtlSuccessfulQueries
Deprecated.Use the API endpoints in the 'network' component instead.Sets the TTL (in seconds) of successful DNS queries (applies after ZAP restart).- Throws:
ClientApiException
-
setOptionHttpStateEnabled
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionProxyChainName
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionProxyChainPassword
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionProxyChainPort
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionProxyChainPrompt
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionProxyChainRealm
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionProxyChainSkipName
Deprecated.Option no longer in effective use.Use actions [add|modify|remove]ProxyChainExcludedDomain instead.- Throws:
ClientApiException
-
setOptionProxyChainUserName
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionSingleCookieRequestHeader
@Deprecated public ApiResponse setOptionSingleCookieRequestHeader(boolean bool) throws ClientApiException Deprecated.Option no longer in effective use.- Throws:
ClientApiException
-
setOptionTimeoutInSecs
Deprecated.Use the API endpoints in the 'network' component instead.Sets the connection time out (in seconds).- Throws:
ClientApiException
-
setOptionUseProxyChain
Deprecated.Use the API endpoints in the 'network' component instead.Sets whether or not the outgoing proxy should be used. The address/hostname of the outgoing proxy must be set to enable this option.- Throws:
ClientApiException
-
setOptionUseProxyChainAuth
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
setOptionUseSocksProxy
Deprecated.Use the API endpoints in the 'network' component instead.Sets whether or not the SOCKS proxy should be used.- Throws:
ClientApiException
-
proxypac
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
rootcert
Deprecated.Use the API endpoints in the 'network' component instead.Gets the Root CA certificate used by the local proxies.- Throws:
ClientApiException
-
setproxy
Deprecated.Use the API endpoints in the 'network' component instead.- Throws:
ClientApiException
-
xmlreport
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.Generates a report in XML format- Throws:
ClientApiException
-
htmlreport
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.Generates a report in HTML format- Throws:
ClientApiException
-
jsonreport
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.Generates a report in JSON format- Throws:
ClientApiException
-
mdreport
Deprecated.Use the 'generate' API endpoint the 'reports' component instead.Generates a report in Markdown format- Throws:
ClientApiException
-
messageHar
Deprecated.Use the API endpoints in the 'exim' add-on instead.Gets the message with the given ID in HAR format- Throws:
ClientApiException
-
messagesHar
@Deprecated public byte[] messagesHar(String baseurl, String start, String count) throws ClientApiException Deprecated.Use the API endpoints in the 'exim' add-on instead.Gets the HTTP messages sent through/by ZAP, in HAR format, optionally filtered by URL and paginated with 'start' position and 'count' of messages- Throws:
ClientApiException
-
messagesHarById
Deprecated.Use the API endpoints in the 'exim' add-on instead.Gets the HTTP messages with the given IDs, in HAR format.- Throws:
ClientApiException
-
sendHarRequest
@Deprecated public byte[] sendHarRequest(String request, String followredirects) throws ClientApiException Deprecated.Use the API endpoints in the 'exim' add-on instead.Sends the first HAR request entry, optionally following redirections. Returns, in HAR format, the request sent and response received and followed redirections, if any. The Mode is enforced when sending the request (and following redirections), custom manual requests are not allowed in 'Safe' mode nor in 'Protected' mode if out of scope.- Throws:
ClientApiException
-
fileDownload
Download a file from the transfer directory- Throws:
ClientApiException
-
fileUpload
Upload a file to the transfer directory. Only POST requests accepted with encodings of "multipart/form-data" or "application/x-www-form-urlencoded".- Throws:
ClientApiException
-