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, xmlreport
public Core(ClientApi api)
public ApiResponse hosts() throws ClientApiException
ClientApiException
public ApiResponse sites() throws ClientApiException
ClientApiException
public ApiResponse urls(java.lang.String baseurl) throws ClientApiException
ClientApiException
public ApiResponse childNodes(java.lang.String url) throws ClientApiException
ClientApiException
public ApiResponse message(java.lang.String id) throws ClientApiException
ClientApiException
public ApiResponse messages(java.lang.String baseurl, java.lang.String start, java.lang.String count) throws ClientApiException
ClientApiException
public ApiResponse messagesById(java.lang.String ids) throws ClientApiException
ClientApiException
public ApiResponse numberOfMessages(java.lang.String baseurl) throws ClientApiException
ClientApiException
public ApiResponse mode() throws ClientApiException
ClientApiException
public ApiResponse version() throws ClientApiException
ClientApiException
public ApiResponse excludedFromProxy() throws ClientApiException
ClientApiException
public ApiResponse homeDirectory() throws ClientApiException
ClientApiException
public ApiResponse sessionLocation() throws ClientApiException
ClientApiException
public 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
ClientApiException
public ApiResponse zapHomePath() throws ClientApiException
ClientApiException
public ApiResponse optionMaximumAlertInstances() throws ClientApiException
ClientApiException
public ApiResponse optionMergeRelatedAlerts() throws ClientApiException
ClientApiException
public 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
ClientApiException
public ApiResponse optionDefaultUserAgent() throws ClientApiException
ClientApiException
public ApiResponse optionDnsTtlSuccessfulQueries() throws ClientApiException
ClientApiException
public ApiResponse optionHttpState() throws ClientApiException
ClientApiException
public ApiResponse optionProxyChainName() throws ClientApiException
ClientApiException
public ApiResponse optionProxyChainPassword() throws ClientApiException
ClientApiException
public ApiResponse optionProxyChainPort() throws ClientApiException
ClientApiException
public ApiResponse optionProxyChainRealm() throws ClientApiException
ClientApiException
public ApiResponse optionProxyChainUserName() throws ClientApiException
ClientApiException
public ApiResponse optionTimeoutInSecs() throws ClientApiException
ClientApiException
public ApiResponse optionHttpStateEnabled() throws ClientApiException
ClientApiException
public ApiResponse optionProxyChainPrompt() throws ClientApiException
ClientApiException
public ApiResponse optionSingleCookieRequestHeader() throws ClientApiException
ClientApiException
public ApiResponse optionUseProxyChain() throws ClientApiException
ClientApiException
public ApiResponse optionUseProxyChainAuth() throws ClientApiException
ClientApiException
public ApiResponse accessUrl(java.lang.String url, java.lang.String followredirects) throws ClientApiException
ClientApiException
public ApiResponse shutdown() throws ClientApiException
ClientApiException
public ApiResponse newSession(java.lang.String name, java.lang.String overwrite) throws ClientApiException
ClientApiException
public ApiResponse loadSession(java.lang.String name) throws ClientApiException
ClientApiException
public ApiResponse saveSession(java.lang.String name, java.lang.String overwrite) throws ClientApiException
ClientApiException
public ApiResponse snapshotSession(java.lang.String name, java.lang.String overwrite) throws ClientApiException
ClientApiException
public ApiResponse clearExcludedFromProxy() throws ClientApiException
ClientApiException
public ApiResponse excludeFromProxy(java.lang.String regex) throws ClientApiException
ClientApiException
public ApiResponse setHomeDirectory(java.lang.String dir) throws ClientApiException
ClientApiException
public ApiResponse setMode(java.lang.String mode) throws ClientApiException
ClientApiException
public ApiResponse generateRootCA() throws ClientApiException
ClientApiException
public ApiResponse sendRequest(java.lang.String request, java.lang.String followredirects) throws ClientApiException
ClientApiException
public ApiResponse runGarbageCollection() throws ClientApiException
ClientApiException
public ApiResponse deleteSiteNode(java.lang.String url, java.lang.String method, java.lang.String postdata) throws ClientApiException
ClientApiException
public ApiResponse addProxyChainExcludedDomain(java.lang.String value, java.lang.String isregex, java.lang.String isenabled) throws ClientApiException
ClientApiException
public ApiResponse modifyProxyChainExcludedDomain(java.lang.String idx, java.lang.String value, java.lang.String isregex, java.lang.String isenabled) throws ClientApiException
ClientApiException
public ApiResponse removeProxyChainExcludedDomain(java.lang.String idx) throws ClientApiException
ClientApiException
public ApiResponse enableAllProxyChainExcludedDomains() throws ClientApiException
ClientApiException
public ApiResponse disableAllProxyChainExcludedDomains() throws ClientApiException
ClientApiException
public ApiResponse setOptionMaximumAlertInstances(java.lang.String numberofinstances) throws ClientApiException
ClientApiException
public ApiResponse setOptionMergeRelatedAlerts(java.lang.String enabled) throws ClientApiException
ClientApiException
public ApiResponse setOptionAlertOverridesFilePath(java.lang.String filepath) throws ClientApiException
ClientApiException
public ApiResponse enablePKCS12ClientCertificate(java.lang.String filepath, java.lang.String password, java.lang.String index) throws ClientApiException
ClientApiException
public ApiResponse disableClientCertificate() throws ClientApiException
ClientApiException
@Deprecated public ApiResponse deleteAllAlerts() throws ClientApiException
ClientApiException
@Deprecated public ApiResponse deleteAlert(java.lang.String id) throws ClientApiException
ClientApiException
public ApiResponse setOptionDefaultUserAgent(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionProxyChainName(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionProxyChainPassword(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionProxyChainRealm(java.lang.String string) throws ClientApiException
ClientApiException
@Deprecated public ApiResponse setOptionProxyChainSkipName(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionProxyChainUserName(java.lang.String string) throws ClientApiException
ClientApiException
public ApiResponse setOptionDnsTtlSuccessfulQueries(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionHttpStateEnabled(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionProxyChainPort(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionProxyChainPrompt(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionSingleCookieRequestHeader(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionTimeoutInSecs(int i) throws ClientApiException
ClientApiException
public ApiResponse setOptionUseProxyChain(boolean bool) throws ClientApiException
ClientApiException
public ApiResponse setOptionUseProxyChainAuth(boolean bool) throws ClientApiException
ClientApiException
public byte[] proxypac() throws ClientApiException
ClientApiException
public byte[] rootcert() throws ClientApiException
ClientApiException
public byte[] setproxy(java.lang.String proxy) throws ClientApiException
ClientApiException
public byte[] xmlreport() throws ClientApiException
ClientApiException
public byte[] htmlreport() throws ClientApiException
ClientApiException
public byte[] jsonreport() throws ClientApiException
ClientApiException
public byte[] mdreport() throws ClientApiException
ClientApiException
public byte[] messageHar(java.lang.String id) throws ClientApiException
ClientApiException
public byte[] messagesHar(java.lang.String baseurl, java.lang.String start, java.lang.String count) throws ClientApiException
ClientApiException
public byte[] messagesHarById(java.lang.String ids) throws ClientApiException
ClientApiException
public byte[] sendHarRequest(java.lang.String request, java.lang.String followredirects) throws ClientApiException
ClientApiException