Class Core


  • public class Core
    extends CoreDeprecated
    This file was automatically generated.
    • Constructor Detail

    • Method Detail

      • message

        public ApiResponse message​(java.lang.String id)
                            throws ClientApiException
        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

        public ApiResponse messages​(java.lang.String baseurl,
                                    java.lang.String start,
                                    java.lang.String count)
                             throws ClientApiException
        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
      • proxyChainExcludedDomains

        @Deprecated
        public ApiResponse proxyChainExcludedDomains()
                                              throws ClientApiException
        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
      • alert

        @Deprecated
        public ApiResponse alert​(java.lang.String id)
                          throws ClientApiException
        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​(java.lang.String baseurl,
                                  java.lang.String start,
                                  java.lang.String count,
                                  java.lang.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
        public ApiResponse alertsSummary​(java.lang.String baseurl)
                                  throws ClientApiException
        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​(java.lang.String baseurl,
                                          java.lang.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
      • optionDefaultUserAgent

        @Deprecated
        public ApiResponse optionDefaultUserAgent()
                                           throws ClientApiException
        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
        public ApiResponse optionDnsTtlSuccessfulQueries()
                                                  throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Gets the TTL (in seconds) of successful DNS queries.
        Throws:
        ClientApiException
      • optionTimeoutInSecs

        @Deprecated
        public ApiResponse optionTimeoutInSecs()
                                        throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Gets the connection time out (in seconds).
        Throws:
        ClientApiException
      • optionUseSocksProxy

        @Deprecated
        public ApiResponse optionUseSocksProxy()
                                        throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Gets whether or not the SOCKS proxy should be used.
        Throws:
        ClientApiException
      • accessUrl

        public ApiResponse accessUrl​(java.lang.String url,
                                     java.lang.String followredirects)
                              throws ClientApiException
        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
      • newSession

        public ApiResponse newSession​(java.lang.String name,
                                      java.lang.String overwrite)
                               throws ClientApiException
        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

        public ApiResponse loadSession​(java.lang.String name)
                                throws ClientApiException
        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
      • snapshotSession

        public ApiResponse snapshotSession​(java.lang.String name,
                                           java.lang.String overwrite)
                                    throws ClientApiException
        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
      • generateRootCA

        @Deprecated
        public ApiResponse generateRootCA()
                                   throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Generates a new Root CA certificate for the local proxies.
        Throws:
        ClientApiException
      • sendRequest

        public ApiResponse sendRequest​(java.lang.String request,
                                       java.lang.String followredirects)
                                throws ClientApiException
        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
      • deleteSiteNode

        public ApiResponse deleteSiteNode​(java.lang.String url,
                                          java.lang.String method,
                                          java.lang.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​(java.lang.String value,
                                                       java.lang.String isregex,
                                                       java.lang.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​(java.lang.String idx,
                                                          java.lang.String value,
                                                          java.lang.String isregex,
                                                          java.lang.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
        public ApiResponse removeProxyChainExcludedDomain​(java.lang.String idx)
                                                   throws ClientApiException
        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
        public ApiResponse enableAllProxyChainExcludedDomains()
                                                       throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Enables all domains excluded from the outgoing proxy.
        Throws:
        ClientApiException
      • disableAllProxyChainExcludedDomains

        @Deprecated
        public ApiResponse disableAllProxyChainExcludedDomains()
                                                        throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Disables all domains excluded from the outgoing proxy.
        Throws:
        ClientApiException
      • setOptionMaximumAlertInstances

        public ApiResponse setOptionMaximumAlertInstances​(java.lang.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

        public ApiResponse setOptionMergeRelatedAlerts​(java.lang.String enabled)
                                                throws ClientApiException
        Sets whether or not related alerts will be merged in any reports generated.
        Throws:
        ClientApiException
      • setOptionAlertOverridesFilePath

        public ApiResponse setOptionAlertOverridesFilePath​(java.lang.String filepath)
                                                    throws ClientApiException
        Sets (or clears, if empty) the path to the file with alert overrides.
        Throws:
        ClientApiException
      • enablePKCS12ClientCertificate

        @Deprecated
        public ApiResponse enablePKCS12ClientCertificate​(java.lang.String filepath,
                                                         java.lang.String password,
                                                         java.lang.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
        public ApiResponse disableClientCertificate()
                                             throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Disables the option for use of client certificates.
        Throws:
        ClientApiException
      • deleteAllAlerts

        @Deprecated
        public ApiResponse deleteAllAlerts()
                                    throws ClientApiException
        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
        public ApiResponse deleteAlert​(java.lang.String id)
                                throws ClientApiException
        Deprecated.
        Use the API endpoint with the same name in the 'alert' component instead.
        Deletes the alert with the given ID.
        Throws:
        ClientApiException
      • setOptionDefaultUserAgent

        @Deprecated
        public ApiResponse setOptionDefaultUserAgent​(java.lang.String string)
                                              throws ClientApiException
        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
        public ApiResponse setOptionDnsTtlSuccessfulQueries​(int i)
                                                     throws ClientApiException
        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
      • setOptionProxyChainPassword

        @Deprecated
        public ApiResponse setOptionProxyChainPassword​(java.lang.String string)
                                                throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Throws:
        ClientApiException
      • setOptionProxyChainRealm

        @Deprecated
        public ApiResponse setOptionProxyChainRealm​(java.lang.String string)
                                             throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Throws:
        ClientApiException
      • setOptionProxyChainSkipName

        @Deprecated
        public ApiResponse setOptionProxyChainSkipName​(java.lang.String string)
                                                throws ClientApiException
        Deprecated.
        Option no longer in effective use.
        Use actions [add|modify|remove]ProxyChainExcludedDomain instead.
        Throws:
        ClientApiException
      • setOptionProxyChainUserName

        @Deprecated
        public ApiResponse setOptionProxyChainUserName​(java.lang.String string)
                                                throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Throws:
        ClientApiException
      • setOptionTimeoutInSecs

        @Deprecated
        public ApiResponse setOptionTimeoutInSecs​(int i)
                                           throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Sets the connection time out (in seconds).
        Throws:
        ClientApiException
      • setOptionUseProxyChain

        @Deprecated
        public ApiResponse setOptionUseProxyChain​(boolean bool)
                                           throws ClientApiException
        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
      • setOptionUseSocksProxy

        @Deprecated
        public ApiResponse setOptionUseSocksProxy​(boolean bool)
                                           throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Sets whether or not the SOCKS proxy should be used.
        Throws:
        ClientApiException
      • rootcert

        @Deprecated
        public byte[] rootcert()
                        throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Gets the Root CA certificate used by the local proxies.
        Throws:
        ClientApiException
      • setproxy

        @Deprecated
        public byte[] setproxy​(java.lang.String proxy)
                        throws ClientApiException
        Deprecated.
        Use the API endpoints in the 'network' component instead.
        Throws:
        ClientApiException
      • xmlreport

        @Deprecated
        public byte[] xmlreport()
                         throws ClientApiException
        Deprecated.
        Use the 'generate' API endpoint the 'reports' component instead.
        Generates a report in XML format
        Throws:
        ClientApiException
      • htmlreport

        @Deprecated
        public byte[] htmlreport()
                          throws ClientApiException
        Deprecated.
        Use the 'generate' API endpoint the 'reports' component instead.
        Generates a report in HTML format
        Throws:
        ClientApiException
      • jsonreport

        @Deprecated
        public byte[] jsonreport()
                          throws ClientApiException
        Deprecated.
        Use the 'generate' API endpoint the 'reports' component instead.
        Generates a report in JSON format
        Throws:
        ClientApiException
      • mdreport

        @Deprecated
        public byte[] mdreport()
                        throws ClientApiException
        Deprecated.
        Use the 'generate' API endpoint the 'reports' component instead.
        Generates a report in Markdown format
        Throws:
        ClientApiException
      • messageHar

        @Deprecated
        public byte[] messageHar​(java.lang.String id)
                          throws ClientApiException
        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​(java.lang.String baseurl,
                                  java.lang.String start,
                                  java.lang.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
        public byte[] messagesHarById​(java.lang.String ids)
                               throws ClientApiException
        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​(java.lang.String request,
                                     java.lang.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