public class Core extends CoreDeprecated
| Modifier and Type | Method and Description |
|---|---|
ApiResponse |
accessUrl(java.lang.String url,
java.lang.String followredirects)
Convenient and simple action to access a URL, optionally following redirections.
|
ApiResponse |
addProxyChainExcludedDomain(java.lang.String value,
java.lang.String isregex,
java.lang.String isenabled)
Adds a domain to be excluded from the outgoing proxy, using the specified value.
|
ApiResponse |
alert(java.lang.String id)
Deprecated.
Use the API endpoint with the same name in the 'alert' component instead.
|
ApiResponse |
alerts(java.lang.String baseurl,
java.lang.String start,
java.lang.String count,
java.lang.String riskid)
Deprecated.
Use the API endpoint with the same name in the 'alert' component instead.
|
ApiResponse |
alertsSummary(java.lang.String baseurl)
Deprecated.
Use the API endpoint with the same name in the 'alert' component instead.
|
ApiResponse |
childNodes(java.lang.String url)
Gets the child nodes underneath the specified URL in the Sites tree
|
ApiResponse |
clearExcludedFromProxy()
Clears the regexes of URLs excluded from the local proxies.
|
ApiResponse |
deleteAlert(java.lang.String id)
Deprecated.
Use the API endpoint with the same name in the 'alert' component instead.
|
ApiResponse |
deleteAllAlerts()
Deprecated.
Use the API endpoint with the same name in the 'alert' component instead.
|
ApiResponse |
deleteSiteNode(java.lang.String url,
java.lang.String method,
java.lang.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).
|
ApiResponse |
disableAllProxyChainExcludedDomains()
Disables all domains excluded from the outgoing proxy.
|
ApiResponse |
disableClientCertificate()
Disables the option for use of client certificates.
|
ApiResponse |
enableAllProxyChainExcludedDomains()
Enables all domains excluded from the outgoing proxy.
|
ApiResponse |
enablePKCS12ClientCertificate(java.lang.String filepath,
java.lang.String password,
java.lang.String index)
Enables use of a PKCS12 client certificate for the certificate with the given file system
path, password, and optional index.
|
ApiResponse |
excludedFromProxy()
Gets the regular expressions, applied to URLs, to exclude from the local proxies.
|
ApiResponse |
excludeFromProxy(java.lang.String regex)
Adds a regex of URLs that should be excluded from the local proxies.
|
ApiResponse |
generateRootCA()
Generates a new Root CA certificate for the local proxies.
|
ApiResponse |
homeDirectory() |
ApiResponse |
hosts()
Gets the name of the hosts accessed through/by ZAP
|
byte[] |
htmlreport()
Generates a report in HTML format
|
byte[] |
jsonreport()
Generates a report in JSON format
|
ApiResponse |
loadSession(java.lang.String name)
Loads the session with the given name.
|
byte[] |
mdreport()
Generates a report in Markdown format
|
ApiResponse |
message(java.lang.String id)
Gets the HTTP message with the given ID.
|
byte[] |
messageHar(java.lang.String id)
Gets the message with the given ID in HAR format
|
ApiResponse |
messages(java.lang.String baseurl,
java.lang.String start,
java.lang.String count)
Gets the HTTP messages sent by ZAP, request and response, optionally filtered by URL and
paginated with 'start' position and 'count' of messages
|
ApiResponse |
messagesById(java.lang.String ids)
Gets the HTTP messages with the given IDs.
|
byte[] |
messagesHar(java.lang.String baseurl,
java.lang.String start,
java.lang.String count)
Gets the HTTP messages sent through/by ZAP, in HAR format, optionally filtered by URL and
paginated with 'start' position and 'count' of messages
|
byte[] |
messagesHarById(java.lang.String ids)
Gets the HTTP messages with the given IDs, in HAR format.
|
ApiResponse |
mode()
Gets the mode
|
ApiResponse |
modifyProxyChainExcludedDomain(java.lang.String idx,
java.lang.String value,
java.lang.String isregex,
java.lang.String isenabled)
Modifies a domain excluded from the outgoing proxy.
|
ApiResponse |
newSession(java.lang.String name,
java.lang.String overwrite)
Creates a new session, optionally overwriting existing files.
|
ApiResponse |
numberOfAlerts(java.lang.String baseurl,
java.lang.String riskid)
Deprecated.
Use the API endpoint with the same name in the 'alert' component instead.
|
ApiResponse |
numberOfMessages(java.lang.String baseurl)
Gets the number of messages, optionally filtering by URL
|
ApiResponse |
optionAlertOverridesFilePath()
Gets the path to the file with alert overrides.
|
ApiResponse |
optionDefaultUserAgent()
Gets the user agent that ZAP should use when creating HTTP messages (for example, spider
messages or CONNECT requests to outgoing proxy).
|
ApiResponse |
optionDnsTtlSuccessfulQueries()
Gets the TTL (in seconds) of successful DNS queries.
|
ApiResponse |
optionHttpState() |
ApiResponse |
optionHttpStateEnabled() |
ApiResponse |
optionMaximumAlertInstances()
Gets the maximum number of alert instances to include in a report.
|
ApiResponse |
optionMergeRelatedAlerts()
Gets whether or not related alerts will be merged in any reports generated.
|
ApiResponse |
optionProxyChainName() |
ApiResponse |
optionProxyChainPassword() |
ApiResponse |
optionProxyChainPort() |
ApiResponse |
optionProxyChainPrompt() |
ApiResponse |
optionProxyChainRealm() |
ApiResponse |
optionProxyChainSkipName()
Deprecated.
|
ApiResponse |
optionProxyChainUserName() |
ApiResponse |
optionProxyExcludedDomains()
Deprecated.
|
ApiResponse |
optionProxyExcludedDomainsEnabled()
Deprecated.
|
ApiResponse |
optionSingleCookieRequestHeader() |
ApiResponse |
optionTimeoutInSecs()
Gets the connection time out, in seconds.
|
ApiResponse |
optionUseProxyChain() |
ApiResponse |
optionUseProxyChainAuth() |
ApiResponse |
proxyChainExcludedDomains()
Gets all the domains that are excluded from the outgoing proxy.
|
byte[] |
proxypac() |
ApiResponse |
removeProxyChainExcludedDomain(java.lang.String idx)
Removes a domain excluded from the outgoing proxy, with the given index.
|
byte[] |
rootcert()
Gets the Root CA certificate used by the local proxies.
|
ApiResponse |
runGarbageCollection() |
ApiResponse |
saveSession(java.lang.String name,
java.lang.String overwrite)
Saves the session with the name supplied, optionally overwriting existing files.
|
byte[] |
sendHarRequest(java.lang.String request,
java.lang.String followredirects)
Sends the first HAR request entry, optionally following redirections.
|
ApiResponse |
sendRequest(java.lang.String request,
java.lang.String followredirects)
Sends the HTTP request, optionally following redirections.
|
ApiResponse |
sessionLocation()
Gets the location of the current session file
|
ApiResponse |
setHomeDirectory(java.lang.String dir) |
ApiResponse |
setMode(java.lang.String mode)
Sets the mode, which may be one of [safe, protect, standard, attack]
|
ApiResponse |
setOptionAlertOverridesFilePath(java.lang.String filepath)
Sets (or clears, if empty) the path to the file with alert overrides.
|
ApiResponse |
setOptionDefaultUserAgent(java.lang.String string)
Sets the user agent that ZAP should use when creating HTTP messages (for example, spider
messages or CONNECT requests to outgoing proxy).
|
ApiResponse |
setOptionDnsTtlSuccessfulQueries(int i)
Sets the TTL (in seconds) of successful DNS queries (applies after ZAP restart).
|
ApiResponse |
setOptionHttpStateEnabled(boolean bool) |
ApiResponse |
setOptionMaximumAlertInstances(java.lang.String numberofinstances)
Sets the maximum number of alert instances to include in a report.
|
ApiResponse |
setOptionMergeRelatedAlerts(java.lang.String enabled)
Sets whether or not related alerts will be merged in any reports generated.
|
ApiResponse |
setOptionProxyChainName(java.lang.String string) |
ApiResponse |
setOptionProxyChainPassword(java.lang.String string) |
ApiResponse |
setOptionProxyChainPort(int i) |
ApiResponse |
setOptionProxyChainPrompt(boolean bool) |
ApiResponse |
setOptionProxyChainRealm(java.lang.String string) |
ApiResponse |
setOptionProxyChainSkipName(java.lang.String string)
Deprecated.
Option no longer in effective use.
|
ApiResponse |
setOptionProxyChainUserName(java.lang.String string) |
ApiResponse |
setOptionSingleCookieRequestHeader(boolean bool) |
ApiResponse |
setOptionTimeoutInSecs(int i)
Sets the connection time out, in seconds.
|
ApiResponse |
setOptionUseProxyChain(boolean bool)
Sets whether or not the outgoing proxy should be used.
|
ApiResponse |
setOptionUseProxyChainAuth(boolean bool) |
byte[] |
setproxy(java.lang.String proxy) |
ApiResponse |
shutdown()
Shuts down ZAP
|
ApiResponse |
sites()
Gets the sites accessed through/by ZAP (scheme and domain)
|
ApiResponse |
snapshotSession(java.lang.String name,
java.lang.String overwrite)
Snapshots the session, optionally with the given name, and overwriting existing files.
|
ApiResponse |
urls(java.lang.String baseurl)
Gets the URLs accessed through/by ZAP, optionally filtering by (base) URL.
|
ApiResponse |
version()
Gets ZAP version
|
byte[] |
xmlreport()
Generates a report in XML format
|
ApiResponse |
zapHomePath()
Gets the path to ZAP's home directory.
|
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, xmlreportpublic Core(ClientApi api)
public ApiResponse hosts() throws ClientApiException
ClientApiExceptionpublic ApiResponse sites() throws ClientApiException
ClientApiExceptionpublic ApiResponse urls(java.lang.String baseurl) throws ClientApiException
ClientApiExceptionpublic ApiResponse childNodes(java.lang.String url) throws ClientApiException
ClientApiExceptionpublic ApiResponse message(java.lang.String id) throws ClientApiException
ClientApiExceptionpublic ApiResponse messages(java.lang.String baseurl, java.lang.String start, java.lang.String count) throws ClientApiException
ClientApiExceptionpublic ApiResponse messagesById(java.lang.String ids) throws ClientApiException
ClientApiExceptionpublic ApiResponse numberOfMessages(java.lang.String baseurl) throws ClientApiException
ClientApiExceptionpublic ApiResponse mode() throws ClientApiException
ClientApiExceptionpublic ApiResponse version() throws ClientApiException
ClientApiExceptionpublic ApiResponse excludedFromProxy() throws ClientApiException
ClientApiExceptionpublic ApiResponse homeDirectory() throws ClientApiException
ClientApiExceptionpublic ApiResponse sessionLocation() throws ClientApiException
ClientApiExceptionpublic ApiResponse proxyChainExcludedDomains() throws ClientApiException
ClientApiException@Deprecated public ApiResponse optionProxyChainSkipName() throws ClientApiException
ClientApiException@Deprecated public ApiResponse optionProxyExcludedDomains() throws ClientApiException
ClientApiException@Deprecated public ApiResponse optionProxyExcludedDomainsEnabled() throws ClientApiException
ClientApiExceptionpublic ApiResponse zapHomePath() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionMaximumAlertInstances() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionMergeRelatedAlerts() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionAlertOverridesFilePath() throws ClientApiException
ClientApiException@Deprecated public ApiResponse alert(java.lang.String id) throws ClientApiException
ClientApiException@Deprecated public ApiResponse alerts(java.lang.String baseurl, java.lang.String start, java.lang.String count, java.lang.String riskid) throws ClientApiException
ClientApiException@Deprecated public ApiResponse alertsSummary(java.lang.String baseurl) throws ClientApiException
ClientApiException@Deprecated public ApiResponse numberOfAlerts(java.lang.String baseurl, java.lang.String riskid) throws ClientApiException
ClientApiExceptionpublic ApiResponse optionDefaultUserAgent() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionDnsTtlSuccessfulQueries() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionHttpState() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionProxyChainName() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionProxyChainPassword() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionProxyChainPort() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionProxyChainRealm() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionProxyChainUserName() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionTimeoutInSecs() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionHttpStateEnabled() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionProxyChainPrompt() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionSingleCookieRequestHeader() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionUseProxyChain() throws ClientApiException
ClientApiExceptionpublic ApiResponse optionUseProxyChainAuth() throws ClientApiException
ClientApiExceptionpublic ApiResponse accessUrl(java.lang.String url, java.lang.String followredirects) throws ClientApiException
ClientApiExceptionpublic ApiResponse shutdown() throws ClientApiException
ClientApiExceptionpublic ApiResponse newSession(java.lang.String name, java.lang.String overwrite) throws ClientApiException
ClientApiExceptionpublic ApiResponse loadSession(java.lang.String name) throws ClientApiException
ClientApiExceptionpublic ApiResponse saveSession(java.lang.String name, java.lang.String overwrite) throws ClientApiException
ClientApiExceptionpublic ApiResponse snapshotSession(java.lang.String name, java.lang.String overwrite) throws ClientApiException
ClientApiExceptionpublic ApiResponse clearExcludedFromProxy() throws ClientApiException
ClientApiExceptionpublic ApiResponse excludeFromProxy(java.lang.String regex) throws ClientApiException
ClientApiExceptionpublic ApiResponse setHomeDirectory(java.lang.String dir) throws ClientApiException
ClientApiExceptionpublic ApiResponse setMode(java.lang.String mode) throws ClientApiException
ClientApiExceptionpublic ApiResponse generateRootCA() throws ClientApiException
ClientApiExceptionpublic ApiResponse sendRequest(java.lang.String request, java.lang.String followredirects) throws ClientApiException
ClientApiExceptionpublic ApiResponse runGarbageCollection() throws ClientApiException
ClientApiExceptionpublic ApiResponse deleteSiteNode(java.lang.String url, java.lang.String method, java.lang.String postdata) throws ClientApiException
ClientApiExceptionpublic ApiResponse addProxyChainExcludedDomain(java.lang.String value, java.lang.String isregex, java.lang.String isenabled) throws ClientApiException
ClientApiExceptionpublic ApiResponse modifyProxyChainExcludedDomain(java.lang.String idx, java.lang.String value, java.lang.String isregex, java.lang.String isenabled) throws ClientApiException
ClientApiExceptionpublic ApiResponse removeProxyChainExcludedDomain(java.lang.String idx) throws ClientApiException
ClientApiExceptionpublic ApiResponse enableAllProxyChainExcludedDomains() throws ClientApiException
ClientApiExceptionpublic ApiResponse disableAllProxyChainExcludedDomains() throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionMaximumAlertInstances(java.lang.String numberofinstances) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionMergeRelatedAlerts(java.lang.String enabled) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionAlertOverridesFilePath(java.lang.String filepath) throws ClientApiException
ClientApiExceptionpublic ApiResponse enablePKCS12ClientCertificate(java.lang.String filepath, java.lang.String password, java.lang.String index) throws ClientApiException
ClientApiExceptionpublic ApiResponse disableClientCertificate() throws ClientApiException
ClientApiException@Deprecated public ApiResponse deleteAllAlerts() throws ClientApiException
ClientApiException@Deprecated public ApiResponse deleteAlert(java.lang.String id) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionDefaultUserAgent(java.lang.String string) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionProxyChainName(java.lang.String string) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionProxyChainPassword(java.lang.String string) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionProxyChainRealm(java.lang.String string) throws ClientApiException
ClientApiException@Deprecated public ApiResponse setOptionProxyChainSkipName(java.lang.String string) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionProxyChainUserName(java.lang.String string) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionDnsTtlSuccessfulQueries(int i) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionHttpStateEnabled(boolean bool) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionProxyChainPort(int i) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionProxyChainPrompt(boolean bool) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionSingleCookieRequestHeader(boolean bool) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionTimeoutInSecs(int i) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionUseProxyChain(boolean bool) throws ClientApiException
ClientApiExceptionpublic ApiResponse setOptionUseProxyChainAuth(boolean bool) throws ClientApiException
ClientApiExceptionpublic byte[] proxypac()
throws ClientApiException
ClientApiExceptionpublic byte[] rootcert()
throws ClientApiException
ClientApiExceptionpublic byte[] setproxy(java.lang.String proxy)
throws ClientApiException
ClientApiExceptionpublic byte[] xmlreport()
throws ClientApiException
ClientApiExceptionpublic byte[] htmlreport()
throws ClientApiException
ClientApiExceptionpublic byte[] jsonreport()
throws ClientApiException
ClientApiExceptionpublic byte[] mdreport()
throws ClientApiException
ClientApiExceptionpublic byte[] messageHar(java.lang.String id)
throws ClientApiException
ClientApiExceptionpublic byte[] messagesHar(java.lang.String baseurl,
java.lang.String start,
java.lang.String count)
throws ClientApiException
ClientApiExceptionpublic byte[] messagesHarById(java.lang.String ids)
throws ClientApiException
ClientApiExceptionpublic byte[] sendHarRequest(java.lang.String request,
java.lang.String followredirects)
throws ClientApiException
ClientApiException