diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02a9e08..48b8b5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '20' - uses: ruby/setup-ruby@v1 with: ruby-version: 3.2 bundler-cache: true + - name: Generate apis.md + run: | + npm install + npm run build - run: bundle exec middleman build diff --git a/.github/workflows/update-website.yml b/.github/workflows/update-website.yml index f363932..40e54e9 100644 --- a/.github/workflows/update-website.yml +++ b/.github/workflows/update-website.yml @@ -12,6 +12,9 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: 3.2 + - uses: actions/setup-node@v3 + with: + node-version: '20' - uses: actions/checkout@v3 with: path: zap-api-docs @@ -22,9 +25,13 @@ jobs: persist-credentials: false path: zaproxy.github.io fetch-depth: 0 - - name: Build API docs + - name: Generate apis.md run: | cd zap-api-docs + npm install + npm run build + - name: Build API docs + run: | gem install bundler bundle install bundle exec middleman build --clean diff --git a/.gitignore b/.gitignore index 79a48bf..8a222cd 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ doc/ # JS node_modules/ /dist/ + +# Generated +/source/includes/apis.md diff --git a/source/includes/apis.md b/source/includes/apis.md deleted file mode 100644 index 9c42702..0000000 --- a/source/includes/apis.md +++ /dev/null @@ -1,40012 +0,0 @@ ---- -title: ZAP API -language_tabs: - - shell: Shell - - java: Java - - python: Python - - ruby: Ruby -toc_footers: [] -includes: [] -search: false -highlight_theme: darkula -headingLevel: 2 - ---- - -#API Catalogue - - -> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu. - -The HTTP API for controlling and accessing ZAP. - -Base URLs: - -* http://zap - -* http://{address}:{port} - - * **address** - The address ZAP is listening on. Default: 127.0.0.1 - - * **port** - The port ZAP is bound to. Default: 8080 - -Email: ZAP User Group Web: ZAP User Group -License: Apache 2.0 - -# Authentication - -* API Key (apiKeyHeader) - - Parameter Name: **X-ZAP-API-Key**, in: header. - -* API Key (apiKeyQuery) - - Parameter Name: **apikey**, in: query. - -

alert

- -## alertViewAlert - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/view/alert/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/view/alert/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/view/alert/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/view/alert/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/view/alert/` - -Gets the alert with the given ID, the corresponding HTTP message can be obtained with the 'messageId' field and 'message' API method - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertViewAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/view/alerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/view/alerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/view/alerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/view/alerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/view/alerts/` - -Gets the alerts raised by ZAP, optionally filtering by URL or riskId, and paginating with 'start' position and 'count' of alerts - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| -|riskId|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertViewAlertsSummary - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/view/alertsSummary/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/view/alertsSummary/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/view/alertsSummary/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/view/alertsSummary/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/view/alertsSummary/` - -Gets number of alerts grouped by each risk level, optionally filtering by URL - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertViewNumberOfAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/view/numberOfAlerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/view/numberOfAlerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/view/numberOfAlerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/view/numberOfAlerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/view/numberOfAlerts/` - -Gets the number of alerts, optionally filtering by URL or riskId - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| -|riskId|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertViewAlertsByRisk - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/view/alertsByRisk/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/view/alertsByRisk/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/view/alertsByRisk/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/view/alertsByRisk/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/view/alertsByRisk/` - -Gets a summary of the alerts, optionally filtered by a 'url'. If 'recurse' is true then all alerts that apply to urls that start with the specified 'url' will be returned, otherwise only those on exactly the same 'url' (ignoring url parameters) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|false|none| -|recurse|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertViewAlertCountsByRisk - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/view/alertCountsByRisk/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/view/alertCountsByRisk/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/view/alertCountsByRisk/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/view/alertCountsByRisk/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/view/alertCountsByRisk/` - -Gets a count of the alerts, optionally filtered as per alertsPerRisk - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|false|none| -|recurse|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertActionDeleteAllAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/action/deleteAllAlerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/action/deleteAllAlerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/action/deleteAllAlerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/action/deleteAllAlerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/action/deleteAllAlerts/` - -Deletes all alerts of the current session. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## alertActionDeleteAlert - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/alert/action/deleteAlert/?id=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/alert/action/deleteAlert/?id=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/alert/action/deleteAlert/', params={ - 'id': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/alert/action/deleteAlert/', - params: { - 'id' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/alert/action/deleteAlert/` - -Deletes the alert with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

acsrf

- -## acsrfViewOptionTokensNames - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/acsrf/view/optionTokensNames/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/acsrf/view/optionTokensNames/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/acsrf/view/optionTokensNames/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/acsrf/view/optionTokensNames/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/acsrf/view/optionTokensNames/` - -Lists the names of all anti-CSRF tokens - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## acsrfActionAddOptionToken - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/acsrf/action/addOptionToken/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/acsrf/action/addOptionToken/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/acsrf/action/addOptionToken/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/acsrf/action/addOptionToken/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/acsrf/action/addOptionToken/` - -Adds an anti-CSRF token with the given name, enabled by default - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## acsrfActionRemoveOptionToken - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/acsrf/action/removeOptionToken/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/acsrf/action/removeOptionToken/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/acsrf/action/removeOptionToken/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/acsrf/action/removeOptionToken/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/acsrf/action/removeOptionToken/` - -Removes the anti-CSRF token with the given name - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## acsrfOtherGenForm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/acsrf/other/genForm/?hrefId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/acsrf/other/genForm/?hrefId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/acsrf/other/genForm/', params={ - 'hrefId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/acsrf/other/genForm/', - params: { - 'hrefId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/acsrf/other/genForm/` - -Generate a form for testing lack of anti-CSRF tokens - typically invoked via ZAP - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|hrefId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

pscan

- -## pscanViewScanOnlyInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/view/scanOnlyInScope/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/view/scanOnlyInScope/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/view/scanOnlyInScope/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/view/scanOnlyInScope/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/view/scanOnlyInScope/` - -Tells whether or not the passive scan should be performed only on messages that are in scope. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanViewRecordsToScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/view/recordsToScan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/view/recordsToScan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/view/recordsToScan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/view/recordsToScan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/view/recordsToScan/` - -The number of records the passive scanner still has to scan - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanViewScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/view/scanners/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/view/scanners/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/view/scanners/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/view/scanners/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/view/scanners/` - -Lists all passive scanners with its ID, name, enabled state and alert threshold. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanViewCurrentRule - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/view/currentRule/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/view/currentRule/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/view/currentRule/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/view/currentRule/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/view/currentRule/` - -Show information about the passive scan rule currently being run (if any). - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanViewMaxAlertsPerRule - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/view/maxAlertsPerRule/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/view/maxAlertsPerRule/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/view/maxAlertsPerRule/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/view/maxAlertsPerRule/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/view/maxAlertsPerRule/` - -Gets the maximum number of alerts a passive scan rule should raise. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionSetEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/setEnabled/?enabled=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/setEnabled/?enabled=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/setEnabled/', params={ - 'enabled': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/setEnabled/', - params: { - 'enabled' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/setEnabled/` - -Sets whether or not the passive scanning is enabled (Note: the enabled state is not persisted). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|enabled|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionSetScanOnlyInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/setScanOnlyInScope/?onlyInScope=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/setScanOnlyInScope/?onlyInScope=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/setScanOnlyInScope/', params={ - 'onlyInScope': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/setScanOnlyInScope/', - params: { - 'onlyInScope' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/setScanOnlyInScope/` - -Sets whether or not the passive scan should be performed only on messages that are in scope. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|onlyInScope|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionEnableAllScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/enableAllScanners/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/enableAllScanners/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/enableAllScanners/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/enableAllScanners/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/enableAllScanners/` - -Enables all passive scanners - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionDisableAllScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/disableAllScanners/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/disableAllScanners/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/disableAllScanners/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/disableAllScanners/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/disableAllScanners/` - -Disables all passive scanners - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionEnableScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/enableScanners/?ids=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/enableScanners/?ids=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/enableScanners/', params={ - 'ids': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/enableScanners/', - params: { - 'ids' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/enableScanners/` - -Enables all passive scanners with the given IDs (comma separated list of IDs) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionDisableScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/disableScanners/?ids=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/disableScanners/?ids=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/disableScanners/', params={ - 'ids': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/disableScanners/', - params: { - 'ids' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/disableScanners/` - -Disables all passive scanners with the given IDs (comma separated list of IDs) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionSetScannerAlertThreshold - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/setScannerAlertThreshold/?id=0&alertThreshold=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/setScannerAlertThreshold/?id=0&alertThreshold=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/setScannerAlertThreshold/', params={ - 'id': '0', 'alertThreshold': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/setScannerAlertThreshold/', - params: { - 'id' => 'integer', -'alertThreshold' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/setScannerAlertThreshold/` - -Sets the alert threshold of the passive scanner with the given ID, accepted values for alert threshold: OFF, DEFAULT, LOW, MEDIUM and HIGH - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| -|alertThreshold|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## pscanActionSetMaxAlertsPerRule - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/pscan/action/setMaxAlertsPerRule/?maxAlerts=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/pscan/action/setMaxAlertsPerRule/?maxAlerts=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/pscan/action/setMaxAlertsPerRule/', params={ - 'maxAlerts': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/pscan/action/setMaxAlertsPerRule/', - params: { - 'maxAlerts' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/pscan/action/setMaxAlertsPerRule/` - -Sets the maximum number of alerts a passive scan rule should raise. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|maxAlerts|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

search

- -## searchViewUrlsByUrlRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/urlsByUrlRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/urlsByUrlRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/urlsByUrlRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/urlsByUrlRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/urlsByUrlRegex/` - -Returns the URLs of the HTTP messages that match the given regular expression in the URL optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewUrlsByRequestRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/urlsByRequestRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/urlsByRequestRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/urlsByRequestRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/urlsByRequestRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/urlsByRequestRegex/` - -Returns the URLs of the HTTP messages that match the given regular expression in the request optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewUrlsByResponseRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/urlsByResponseRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/urlsByResponseRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/urlsByResponseRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/urlsByResponseRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/urlsByResponseRegex/` - -Returns the URLs of the HTTP messages that match the given regular expression in the response optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewUrlsByHeaderRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/urlsByHeaderRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/urlsByHeaderRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/urlsByHeaderRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/urlsByHeaderRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/urlsByHeaderRegex/` - -Returns the URLs of the HTTP messages that match the given regular expression in the header(s) optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewMessagesByUrlRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/messagesByUrlRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/messagesByUrlRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/messagesByUrlRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/messagesByUrlRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/messagesByUrlRegex/` - -Returns the HTTP messages that match the given regular expression in the URL optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewMessagesByRequestRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/messagesByRequestRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/messagesByRequestRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/messagesByRequestRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/messagesByRequestRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/messagesByRequestRegex/` - -Returns the HTTP messages that match the given regular expression in the request optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewMessagesByResponseRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/messagesByResponseRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/messagesByResponseRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/messagesByResponseRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/messagesByResponseRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/messagesByResponseRegex/` - -Returns the HTTP messages that match the given regular expression in the response optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchViewMessagesByHeaderRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/search/view/messagesByHeaderRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/search/view/messagesByHeaderRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/search/view/messagesByHeaderRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/search/view/messagesByHeaderRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/search/view/messagesByHeaderRegex/` - -Returns the HTTP messages that match the given regular expression in the header(s) optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchOtherHarByUrlRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/search/other/harByUrlRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/search/other/harByUrlRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/search/other/harByUrlRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/search/other/harByUrlRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/search/other/harByUrlRegex/` - -Returns the HTTP messages, in HAR format, that match the given regular expression in the URL optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchOtherHarByRequestRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/search/other/harByRequestRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/search/other/harByRequestRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/search/other/harByRequestRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/search/other/harByRequestRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/search/other/harByRequestRegex/` - -Returns the HTTP messages, in HAR format, that match the given regular expression in the request optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchOtherHarByResponseRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/search/other/harByResponseRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/search/other/harByResponseRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/search/other/harByResponseRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/search/other/harByResponseRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/search/other/harByResponseRegex/` - -Returns the HTTP messages, in HAR format, that match the given regular expression in the response optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## searchOtherHarByHeaderRegex - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/search/other/harByHeaderRegex/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/search/other/harByHeaderRegex/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/search/other/harByHeaderRegex/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/search/other/harByHeaderRegex/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/search/other/harByHeaderRegex/` - -Returns the HTTP messages, in HAR format, that match the given regular expression in the header(s) optionally filtered by URL and paginated with 'start' position and 'count' of messages. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

autoupdate

- -## autoupdateViewLatestVersionNumber - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/latestVersionNumber/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/latestVersionNumber/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/latestVersionNumber/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/latestVersionNumber/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/latestVersionNumber/` - -Returns the latest version number - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewIsLatestVersion - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/isLatestVersion/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/isLatestVersion/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/isLatestVersion/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/isLatestVersion/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/isLatestVersion/` - -Returns 'true' if ZAP is on the latest version - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewInstalledAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/installedAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/installedAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/installedAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/installedAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/installedAddons/` - -Return a list of all of the installed add-ons - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewLocalAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/localAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/localAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/localAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/localAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/localAddons/` - -Returns a list with all local add-ons, installed or not. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewNewAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/newAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/newAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/newAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/newAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/newAddons/` - -Return a list of any add-ons that have been added to the Marketplace since the last check for updates - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewUpdatedAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/updatedAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/updatedAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/updatedAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/updatedAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/updatedAddons/` - -Return a list of any add-ons that have been changed in the Marketplace since the last check for updates - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewMarketplaceAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/marketplaceAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/marketplaceAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/marketplaceAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/marketplaceAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/marketplaceAddons/` - -Return a list of all of the add-ons on the ZAP Marketplace (this information is read once and then cached) - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionAddonDirectories - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionAddonDirectories/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionAddonDirectories/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionAddonDirectories/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionAddonDirectories/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionAddonDirectories/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionDayLastChecked - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionDayLastChecked/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionDayLastChecked/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionDayLastChecked/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionDayLastChecked/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionDayLastChecked/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionDayLastInstallWarned - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionDayLastInstallWarned/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionDayLastInstallWarned/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionDayLastInstallWarned/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionDayLastInstallWarned/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionDayLastInstallWarned/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionDayLastUpdateWarned - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionDayLastUpdateWarned/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionDayLastUpdateWarned/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionDayLastUpdateWarned/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionDayLastUpdateWarned/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionDayLastUpdateWarned/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionDownloadDirectory - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionDownloadDirectory/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionDownloadDirectory/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionDownloadDirectory/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionDownloadDirectory/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionDownloadDirectory/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionCheckAddonUpdates - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionCheckAddonUpdates/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionCheckAddonUpdates/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionCheckAddonUpdates/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionCheckAddonUpdates/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionCheckAddonUpdates/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionCheckOnStart - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionCheckOnStart/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionCheckOnStart/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionCheckOnStart/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionCheckOnStart/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionCheckOnStart/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionDownloadNewRelease - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionDownloadNewRelease/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionDownloadNewRelease/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionDownloadNewRelease/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionDownloadNewRelease/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionDownloadNewRelease/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionInstallAddonUpdates - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionInstallAddonUpdates/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionInstallAddonUpdates/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionInstallAddonUpdates/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionInstallAddonUpdates/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionInstallAddonUpdates/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionInstallScannerRules - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionInstallScannerRules/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionInstallScannerRules/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionInstallScannerRules/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionInstallScannerRules/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionInstallScannerRules/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionReportAlphaAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionReportAlphaAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionReportAlphaAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionReportAlphaAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionReportAlphaAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionReportAlphaAddons/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionReportBetaAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionReportBetaAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionReportBetaAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionReportBetaAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionReportBetaAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionReportBetaAddons/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateViewOptionReportReleaseAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/view/optionReportReleaseAddons/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/view/optionReportReleaseAddons/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/view/optionReportReleaseAddons/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/view/optionReportReleaseAddons/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/view/optionReportReleaseAddons/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionDownloadLatestRelease - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/downloadLatestRelease/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/downloadLatestRelease/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/downloadLatestRelease/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/downloadLatestRelease/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/downloadLatestRelease/` - -Downloads the latest release, if any - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionInstallAddon - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/installAddon/?id=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/installAddon/?id=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/installAddon/', params={ - 'id': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/installAddon/', - params: { - 'id' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/installAddon/` - -Installs or updates the specified add-on, returning when complete (ie not asynchronously) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionInstallLocalAddon - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/installLocalAddon/?file=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/installLocalAddon/?file=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/installLocalAddon/', params={ - 'file': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/installLocalAddon/', - params: { - 'file' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/installLocalAddon/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|file|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionUninstallAddon - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/uninstallAddon/?id=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/uninstallAddon/?id=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/uninstallAddon/', params={ - 'id': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/uninstallAddon/', - params: { - 'id' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/uninstallAddon/` - -Uninstalls the specified add-on - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionCheckAddonUpdates - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionCheckAddonUpdates/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionCheckAddonUpdates/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionCheckAddonUpdates/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionCheckAddonUpdates/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionCheckAddonUpdates/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionCheckOnStart - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionCheckOnStart/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionCheckOnStart/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionCheckOnStart/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionCheckOnStart/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionCheckOnStart/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionDownloadNewRelease - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionDownloadNewRelease/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionDownloadNewRelease/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionDownloadNewRelease/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionDownloadNewRelease/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionDownloadNewRelease/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionInstallAddonUpdates - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionInstallAddonUpdates/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionInstallAddonUpdates/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionInstallAddonUpdates/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionInstallAddonUpdates/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionInstallAddonUpdates/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionInstallScannerRules - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionInstallScannerRules/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionInstallScannerRules/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionInstallScannerRules/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionInstallScannerRules/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionInstallScannerRules/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionReportAlphaAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionReportAlphaAddons/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionReportAlphaAddons/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionReportAlphaAddons/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionReportAlphaAddons/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionReportAlphaAddons/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionReportBetaAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionReportBetaAddons/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionReportBetaAddons/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionReportBetaAddons/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionReportBetaAddons/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionReportBetaAddons/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## autoupdateActionSetOptionReportReleaseAddons - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/autoupdate/action/setOptionReportReleaseAddons/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/autoupdate/action/setOptionReportReleaseAddons/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/autoupdate/action/setOptionReportReleaseAddons/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/autoupdate/action/setOptionReportReleaseAddons/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/autoupdate/action/setOptionReportReleaseAddons/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

spider

- -## spiderViewStatus - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/status/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/status/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/status/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/status/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/status/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewResults - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/results/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/results/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/results/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/results/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/results/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewFullResults - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/fullResults/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/fullResults/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/fullResults/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/fullResults/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/fullResults/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/scans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/scans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/scans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/scans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/scans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewExcludedFromScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/excludedFromScan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/excludedFromScan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/excludedFromScan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/excludedFromScan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/excludedFromScan/` - -Gets the regexes of URLs excluded from the spider scans. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewAllUrls - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/allUrls/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/allUrls/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/allUrls/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/allUrls/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/allUrls/` - -Returns a list of unique URLs from the history table based on HTTP messages added by the Spider. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewAddedNodes - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/addedNodes/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/addedNodes/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/addedNodes/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/addedNodes/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/addedNodes/` - -Returns a list of the names of the nodes added to the Sites tree by the specified scan. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewDomainsAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/domainsAlwaysInScope/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/domainsAlwaysInScope/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/domainsAlwaysInScope/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/domainsAlwaysInScope/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/domainsAlwaysInScope/` - -Gets all the domains that are always in scope. For each domain the following are shown: the index, the value (domain), if enabled, and if specified as a regex. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionDomainsAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionDomainsAlwaysInScope/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionDomainsAlwaysInScope/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionDomainsAlwaysInScope/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionDomainsAlwaysInScope/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionDomainsAlwaysInScope/` - -Use view domainsAlwaysInScope instead. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionDomainsAlwaysInScopeEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionDomainsAlwaysInScopeEnabled/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionDomainsAlwaysInScopeEnabled/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionDomainsAlwaysInScopeEnabled/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionDomainsAlwaysInScopeEnabled/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionDomainsAlwaysInScopeEnabled/` - -Use view domainsAlwaysInScope instead. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionHandleParameters - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionHandleParameters/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionHandleParameters/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionHandleParameters/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionHandleParameters/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionHandleParameters/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionMaxChildren - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionMaxChildren/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionMaxChildren/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionMaxChildren/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionMaxChildren/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionMaxChildren/` - -Gets the maximum number of child nodes (per node) that can be crawled, 0 means no limit. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionMaxDepth - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionMaxDepth/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionMaxDepth/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionMaxDepth/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionMaxDepth/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionMaxDepth/` - -Gets the maximum depth the spider can crawl, 0 if unlimited. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionMaxDuration - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionMaxDuration/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionMaxDuration/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionMaxDuration/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionMaxDuration/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionMaxDuration/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionMaxParseSizeBytes - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionMaxParseSizeBytes/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionMaxParseSizeBytes/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionMaxParseSizeBytes/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionMaxParseSizeBytes/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionMaxParseSizeBytes/` - -Gets the maximum size, in bytes, that a response might have to be parsed. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionMaxScansInUI - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionMaxScansInUI/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionMaxScansInUI/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionMaxScansInUI/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionMaxScansInUI/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionMaxScansInUI/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionRequestWaitTime - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionRequestWaitTime/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionRequestWaitTime/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionRequestWaitTime/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionRequestWaitTime/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionRequestWaitTime/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionScope/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionScope/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionScope/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionScope/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionScope/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionScopeText - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionScopeText/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionScopeText/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionScopeText/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionScopeText/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionScopeText/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionSkipURLString - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionSkipURLString/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionSkipURLString/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionSkipURLString/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionSkipURLString/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionSkipURLString/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionThreadCount - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionThreadCount/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionThreadCount/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionThreadCount/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionThreadCount/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionThreadCount/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionUserAgent - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionUserAgent/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionUserAgent/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionUserAgent/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionUserAgent/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionUserAgent/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionAcceptCookies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionAcceptCookies/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionAcceptCookies/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionAcceptCookies/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionAcceptCookies/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionAcceptCookies/` - -Gets whether or not a spider process should accept cookies while spidering. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionHandleODataParametersVisited - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionHandleODataParametersVisited/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionHandleODataParametersVisited/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionHandleODataParametersVisited/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionHandleODataParametersVisited/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionHandleODataParametersVisited/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionParseComments - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionParseComments/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionParseComments/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionParseComments/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionParseComments/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionParseComments/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionParseGit - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionParseGit/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionParseGit/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionParseGit/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionParseGit/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionParseGit/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionParseRobotsTxt - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionParseRobotsTxt/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionParseRobotsTxt/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionParseRobotsTxt/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionParseRobotsTxt/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionParseRobotsTxt/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionParseSVNEntries - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionParseSVNEntries/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionParseSVNEntries/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionParseSVNEntries/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionParseSVNEntries/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionParseSVNEntries/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionParseSitemapXml - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionParseSitemapXml/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionParseSitemapXml/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionParseSitemapXml/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionParseSitemapXml/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionParseSitemapXml/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionPostForm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionPostForm/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionPostForm/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionPostForm/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionPostForm/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionPostForm/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionProcessForm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionProcessForm/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionProcessForm/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionProcessForm/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionProcessForm/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionProcessForm/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionSendRefererHeader - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionSendRefererHeader/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionSendRefererHeader/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionSendRefererHeader/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionSendRefererHeader/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionSendRefererHeader/` - -Gets whether or not the 'Referer' header should be sent while spidering. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderViewOptionShowAdvancedDialog - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/view/optionShowAdvancedDialog/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/view/optionShowAdvancedDialog/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/view/optionShowAdvancedDialog/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/view/optionShowAdvancedDialog/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/view/optionShowAdvancedDialog/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/scan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/scan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/scan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/scan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/scan/` - -Runs the spider against the given URL (or context). Optionally, the 'maxChildren' parameter can be set to limit the number of children scanned, the 'recurse' parameter can be used to prevent the spider from seeding recursively, the parameter 'contextName' can be used to constrain the scan to a Context and the parameter 'subtreeOnly' allows to restrict the spider under a site's subtree (using the specified 'url'). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|false|none| -|maxChildren|query|integer|false|none| -|recurse|query|boolean|false|none| -|contextName|query|string|false|none| -|subtreeOnly|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionScanAsUser - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/scanAsUser/?contextId=0&userId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/scanAsUser/?contextId=0&userId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/scanAsUser/', params={ - 'contextId': '0', 'userId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/scanAsUser/', - params: { - 'contextId' => 'integer', -'userId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/scanAsUser/` - -Runs the spider from the perspective of a User, obtained using the given Context ID and User ID. See 'scan' action for more details. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| -|url|query|string|false|none| -|maxChildren|query|integer|false|none| -|recurse|query|boolean|false|none| -|subtreeOnly|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionPause - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/pause/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/pause/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/pause/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/pause/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/pause/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionResume - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/resume/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/resume/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/resume/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/resume/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/resume/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionStop - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/stop/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/stop/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/stop/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/stop/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/stop/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionRemoveScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/removeScan/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/removeScan/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/removeScan/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/removeScan/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/removeScan/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionPauseAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/pauseAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/pauseAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/pauseAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/pauseAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/pauseAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionResumeAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/resumeAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/resumeAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/resumeAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/resumeAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/resumeAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionStopAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/stopAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/stopAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/stopAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/stopAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/stopAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionRemoveAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/removeAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/removeAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/removeAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/removeAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/removeAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionClearExcludedFromScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/clearExcludedFromScan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/clearExcludedFromScan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/clearExcludedFromScan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/clearExcludedFromScan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/clearExcludedFromScan/` - -Clears the regexes of URLs excluded from the spider scans. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionExcludeFromScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/excludeFromScan/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/excludeFromScan/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/excludeFromScan/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/excludeFromScan/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/excludeFromScan/` - -Adds a regex of URLs that should be excluded from the spider scans. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionAddDomainAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/addDomainAlwaysInScope/?value=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/addDomainAlwaysInScope/?value=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/addDomainAlwaysInScope/', params={ - 'value': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/addDomainAlwaysInScope/', - params: { - 'value' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/addDomainAlwaysInScope/` - -Adds a new domain that's always in scope, 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). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|value|query|string|true|none| -|isRegex|query|boolean|false|none| -|isEnabled|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionModifyDomainAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/modifyDomainAlwaysInScope/?idx=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/modifyDomainAlwaysInScope/?idx=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/modifyDomainAlwaysInScope/', params={ - 'idx': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/modifyDomainAlwaysInScope/', - params: { - 'idx' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/modifyDomainAlwaysInScope/` - -Modifies a domain that's always in scope. 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 domainsAlwaysInScope. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|idx|query|integer|true|none| -|value|query|string|false|none| -|isRegex|query|boolean|false|none| -|isEnabled|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionRemoveDomainAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/removeDomainAlwaysInScope/?idx=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/removeDomainAlwaysInScope/?idx=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/removeDomainAlwaysInScope/', params={ - 'idx': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/removeDomainAlwaysInScope/', - params: { - 'idx' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/removeDomainAlwaysInScope/` - -Removes a domain that's always in scope, with the given index. The index can be obtained with the view domainsAlwaysInScope. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|idx|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionEnableAllDomainsAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/enableAllDomainsAlwaysInScope/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/enableAllDomainsAlwaysInScope/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/enableAllDomainsAlwaysInScope/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/enableAllDomainsAlwaysInScope/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/enableAllDomainsAlwaysInScope/` - -Enables all domains that are always in scope. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionDisableAllDomainsAlwaysInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/disableAllDomainsAlwaysInScope/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/disableAllDomainsAlwaysInScope/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/disableAllDomainsAlwaysInScope/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/disableAllDomainsAlwaysInScope/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/disableAllDomainsAlwaysInScope/` - -Disables all domains that are always in scope. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionHandleParameters - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionHandleParameters/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionHandleParameters/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionHandleParameters/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionHandleParameters/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionHandleParameters/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionScopeString - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionScopeString/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionScopeString/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionScopeString/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionScopeString/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionScopeString/` - -Use actions [add|modify|remove]DomainAlwaysInScope instead. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionSkipURLString - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionSkipURLString/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionSkipURLString/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionSkipURLString/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionSkipURLString/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionSkipURLString/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionUserAgent - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionUserAgent/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionUserAgent/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionUserAgent/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionUserAgent/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionUserAgent/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionAcceptCookies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionAcceptCookies/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionAcceptCookies/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionAcceptCookies/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionAcceptCookies/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionAcceptCookies/` - -Sets whether or not a spider process should accept cookies while spidering. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionHandleODataParametersVisited - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionHandleODataParametersVisited/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionHandleODataParametersVisited/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionHandleODataParametersVisited/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionHandleODataParametersVisited/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionHandleODataParametersVisited/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionMaxChildren - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionMaxChildren/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionMaxChildren/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionMaxChildren/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionMaxChildren/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionMaxChildren/` - -Sets the maximum number of child nodes (per node) that can be crawled, 0 means no limit. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionMaxDepth - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionMaxDepth/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionMaxDepth/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionMaxDepth/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionMaxDepth/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionMaxDepth/` - -Sets the maximum depth the spider can crawl, 0 for unlimited depth. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionMaxDuration - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionMaxDuration/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionMaxDuration/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionMaxDuration/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionMaxDuration/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionMaxDuration/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionMaxParseSizeBytes - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionMaxParseSizeBytes/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionMaxParseSizeBytes/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionMaxParseSizeBytes/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionMaxParseSizeBytes/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionMaxParseSizeBytes/` - -Sets the maximum size, in bytes, that a response might have to be parsed. This allows the spider to skip big responses/files. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionMaxScansInUI - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionMaxScansInUI/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionMaxScansInUI/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionMaxScansInUI/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionMaxScansInUI/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionMaxScansInUI/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionParseComments - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionParseComments/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionParseComments/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionParseComments/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionParseComments/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionParseComments/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionParseGit - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionParseGit/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionParseGit/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionParseGit/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionParseGit/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionParseGit/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionParseRobotsTxt - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionParseRobotsTxt/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionParseRobotsTxt/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionParseRobotsTxt/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionParseRobotsTxt/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionParseRobotsTxt/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionParseSVNEntries - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionParseSVNEntries/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionParseSVNEntries/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionParseSVNEntries/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionParseSVNEntries/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionParseSVNEntries/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionParseSitemapXml - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionParseSitemapXml/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionParseSitemapXml/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionParseSitemapXml/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionParseSitemapXml/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionParseSitemapXml/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionPostForm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionPostForm/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionPostForm/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionPostForm/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionPostForm/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionPostForm/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionProcessForm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionProcessForm/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionProcessForm/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionProcessForm/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionProcessForm/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionProcessForm/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionRequestWaitTime - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionRequestWaitTime/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionRequestWaitTime/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionRequestWaitTime/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionRequestWaitTime/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionRequestWaitTime/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionSendRefererHeader - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionSendRefererHeader/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionSendRefererHeader/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionSendRefererHeader/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionSendRefererHeader/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionSendRefererHeader/` - -Sets whether or not the 'Referer' header should be sent while spidering. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionShowAdvancedDialog - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionShowAdvancedDialog/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionShowAdvancedDialog/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionShowAdvancedDialog/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionShowAdvancedDialog/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionShowAdvancedDialog/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## spiderActionSetOptionThreadCount - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/spider/action/setOptionThreadCount/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/spider/action/setOptionThreadCount/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/spider/action/setOptionThreadCount/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/spider/action/setOptionThreadCount/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/spider/action/setOptionThreadCount/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

core

- -## coreViewHosts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/hosts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/hosts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/hosts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/hosts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/hosts/` - -Gets the name of the hosts accessed through/by ZAP - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewSites - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/sites/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/sites/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/sites/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/sites/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/sites/` - -Gets the sites accessed through/by ZAP (scheme and domain) - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewUrls - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/urls/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/urls/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/urls/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/urls/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/urls/` - -Gets the URLs accessed through/by ZAP, optionally filtering by (base) URL. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewChildNodes - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/childNodes/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/childNodes/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/childNodes/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/childNodes/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/childNodes/` - -Gets the child nodes underneath the specified URL in the Sites tree - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewMessage - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/message/?id=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/message/?id=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/message/', params={ - 'id': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/message/', - params: { - 'id' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/message/` - -Gets the HTTP message with the given ID. Returns the ID, request/response headers and bodies, cookies, note, type, RTT, and timestamp. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewMessages - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/messages/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/messages/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/messages/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/messages/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/messages/` - -Gets the HTTP messages sent by ZAP, request and response, optionally filtered by URL and paginated with 'start' position and 'count' of messages - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewMessagesById - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/messagesById/?ids=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/messagesById/?ids=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/messagesById/', params={ - 'ids': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/messagesById/', - params: { - 'ids' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/messagesById/` - -Gets the HTTP messages with the given IDs. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewNumberOfMessages - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/numberOfMessages/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/numberOfMessages/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/numberOfMessages/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/numberOfMessages/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/numberOfMessages/` - -Gets the number of messages, optionally filtering by URL - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewMode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/mode/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/mode/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/mode/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/mode/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/mode/` - -Gets the mode - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewVersion - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/version/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/version/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/version/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/version/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/version/` - -Gets ZAP version - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewExcludedFromProxy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/excludedFromProxy/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/excludedFromProxy/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/excludedFromProxy/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/excludedFromProxy/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/excludedFromProxy/` - -Gets the regular expressions, applied to URLs, to exclude from the local proxies. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewHomeDirectory - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/homeDirectory/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/homeDirectory/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/homeDirectory/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/homeDirectory/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/homeDirectory/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewSessionLocation - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/sessionLocation/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/sessionLocation/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/sessionLocation/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/sessionLocation/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/sessionLocation/` - -Gets the location of the current session file - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewProxyChainExcludedDomains - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/proxyChainExcludedDomains/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/proxyChainExcludedDomains/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/proxyChainExcludedDomains/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/proxyChainExcludedDomains/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/proxyChainExcludedDomains/` - -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. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainSkipName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainSkipName/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainSkipName/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainSkipName/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainSkipName/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainSkipName/` - -Use view proxyChainExcludedDomains instead. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyExcludedDomains - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyExcludedDomains/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyExcludedDomains/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyExcludedDomains/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyExcludedDomains/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyExcludedDomains/` - -Use view proxyChainExcludedDomains instead. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyExcludedDomainsEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyExcludedDomainsEnabled/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyExcludedDomainsEnabled/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyExcludedDomainsEnabled/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyExcludedDomainsEnabled/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyExcludedDomainsEnabled/` - -Use view proxyChainExcludedDomains instead. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewZapHomePath - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/zapHomePath/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/zapHomePath/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/zapHomePath/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/zapHomePath/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/zapHomePath/` - -Gets the path to ZAP's home directory. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionMaximumAlertInstances - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionMaximumAlertInstances/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionMaximumAlertInstances/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionMaximumAlertInstances/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionMaximumAlertInstances/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionMaximumAlertInstances/` - -Gets the maximum number of alert instances to include in a report. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionMergeRelatedAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionMergeRelatedAlerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionMergeRelatedAlerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionMergeRelatedAlerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionMergeRelatedAlerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionMergeRelatedAlerts/` - -Gets whether or not related alerts will be merged in any reports generated. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionAlertOverridesFilePath - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionAlertOverridesFilePath/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionAlertOverridesFilePath/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionAlertOverridesFilePath/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionAlertOverridesFilePath/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionAlertOverridesFilePath/` - -Gets the path to the file with alert overrides. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewAlert - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/alert/?id=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/alert/?id=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/alert/', params={ - 'id': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/alert/', - params: { - 'id' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/alert/` - -Gets the alert with the given ID, the corresponding HTTP message can be obtained with the 'messageId' field and 'message' API method - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/alerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/alerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/alerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/alerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/alerts/` - -Gets the alerts raised by ZAP, optionally filtering by URL or riskId, and paginating with 'start' position and 'count' of alerts - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| -|riskId|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewAlertsSummary - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/alertsSummary/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/alertsSummary/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/alertsSummary/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/alertsSummary/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/alertsSummary/` - -Gets number of alerts grouped by each risk level, optionally filtering by URL - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewNumberOfAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/numberOfAlerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/numberOfAlerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/numberOfAlerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/numberOfAlerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/numberOfAlerts/` - -Gets the number of alerts, optionally filtering by URL or riskId - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| -|riskId|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionDefaultUserAgent - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionDefaultUserAgent/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionDefaultUserAgent/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionDefaultUserAgent/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionDefaultUserAgent/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionDefaultUserAgent/` - -Gets the user agent that ZAP should use when creating HTTP messages (for example, spider messages or CONNECT requests to outgoing proxy). - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionDnsTtlSuccessfulQueries - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionDnsTtlSuccessfulQueries/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionDnsTtlSuccessfulQueries/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionDnsTtlSuccessfulQueries/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionDnsTtlSuccessfulQueries/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionDnsTtlSuccessfulQueries/` - -Gets the TTL (in seconds) of successful DNS queries. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionHttpState - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionHttpState/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionHttpState/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionHttpState/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionHttpState/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionHttpState/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainName/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainName/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainName/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainName/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainName/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainPassword - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainPassword/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainPassword/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainPassword/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainPassword/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainPassword/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainPort - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainPort/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainPort/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainPort/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainPort/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainPort/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainRealm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainRealm/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainRealm/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainRealm/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainRealm/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainRealm/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainUserName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainUserName/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainUserName/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainUserName/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainUserName/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainUserName/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionTimeoutInSecs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionTimeoutInSecs/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionTimeoutInSecs/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionTimeoutInSecs/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionTimeoutInSecs/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionTimeoutInSecs/` - -Gets the connection time out, in seconds. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionHttpStateEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionHttpStateEnabled/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionHttpStateEnabled/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionHttpStateEnabled/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionHttpStateEnabled/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionHttpStateEnabled/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionProxyChainPrompt - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionProxyChainPrompt/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionProxyChainPrompt/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionProxyChainPrompt/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionProxyChainPrompt/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionProxyChainPrompt/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionSingleCookieRequestHeader - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionSingleCookieRequestHeader/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionSingleCookieRequestHeader/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionSingleCookieRequestHeader/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionSingleCookieRequestHeader/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionSingleCookieRequestHeader/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionUseProxyChain - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionUseProxyChain/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionUseProxyChain/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionUseProxyChain/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionUseProxyChain/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionUseProxyChain/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreViewOptionUseProxyChainAuth - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/view/optionUseProxyChainAuth/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/view/optionUseProxyChainAuth/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/view/optionUseProxyChainAuth/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/view/optionUseProxyChainAuth/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/view/optionUseProxyChainAuth/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionAccessUrl - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/accessUrl/?url=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/accessUrl/?url=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/accessUrl/', params={ - 'url': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/accessUrl/', - params: { - 'url' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/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'. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|true|none| -|followRedirects|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionShutdown - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/shutdown/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/shutdown/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/shutdown/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/shutdown/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/shutdown/` - -Shuts down ZAP - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionNewSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/newSession/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/newSession/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/newSession/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/newSession/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|name|query|string|false|none| -|overwrite|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionLoadSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/loadSession/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/loadSession/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/loadSession/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/loadSession/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|name|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSaveSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/saveSession/?name=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/saveSession/?name=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/saveSession/', params={ - 'name': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/saveSession/', - params: { - 'name' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/saveSession/` - -Saves the session with the name supplied, optionally overwriting existing files. If a relative path is specified it will be resolved against the "session" directory in ZAP "home" dir. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|name|query|string|true|none| -|overwrite|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSnapshotSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/snapshotSession/?name=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/snapshotSession/?name=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/snapshotSession/', params={ - 'name': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/snapshotSession/', - params: { - 'name' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|name|query|string|true|none| -|overwrite|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionClearExcludedFromProxy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/clearExcludedFromProxy/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/clearExcludedFromProxy/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/clearExcludedFromProxy/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/clearExcludedFromProxy/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/clearExcludedFromProxy/` - -Clears the regexes of URLs excluded from the local proxies. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionExcludeFromProxy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/excludeFromProxy/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/excludeFromProxy/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/excludeFromProxy/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/excludeFromProxy/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/excludeFromProxy/` - -Adds a regex of URLs that should be excluded from the local proxies. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetHomeDirectory - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setHomeDirectory/?dir=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setHomeDirectory/?dir=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setHomeDirectory/', params={ - 'dir': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setHomeDirectory/', - params: { - 'dir' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setHomeDirectory/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|dir|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetMode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setMode/?mode=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setMode/?mode=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setMode/', params={ - 'mode': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setMode/', - params: { - 'mode' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setMode/` - -Sets the mode, which may be one of [safe, protect, standard, attack] - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|mode|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionGenerateRootCA - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/generateRootCA/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/generateRootCA/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/generateRootCA/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/generateRootCA/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/generateRootCA/` - -Generates a new Root CA certificate for the local proxies. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSendRequest - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/sendRequest/?request=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/sendRequest/?request=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/sendRequest/', params={ - 'request': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/sendRequest/', - params: { - 'request' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|request|query|string|true|none| -|followRedirects|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionRunGarbageCollection - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/runGarbageCollection/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/runGarbageCollection/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/runGarbageCollection/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/runGarbageCollection/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/runGarbageCollection/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionDeleteSiteNode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/deleteSiteNode/?url=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/deleteSiteNode/?url=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/deleteSiteNode/', params={ - 'url': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/deleteSiteNode/', - params: { - 'url' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/deleteSiteNode/` - -Deletes the site node found in the Sites Tree on the basis of the URL, HTTP method, and post data (if applicable and specified). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|true|none| -|method|query|string|false|none| -|postData|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionAddProxyChainExcludedDomain - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/addProxyChainExcludedDomain/?value=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/addProxyChainExcludedDomain/?value=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/addProxyChainExcludedDomain/', params={ - 'value': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/addProxyChainExcludedDomain/', - params: { - 'value' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/addProxyChainExcludedDomain/` - -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). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|value|query|string|true|none| -|isRegex|query|boolean|false|none| -|isEnabled|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionModifyProxyChainExcludedDomain - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/modifyProxyChainExcludedDomain/?idx=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/modifyProxyChainExcludedDomain/?idx=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/modifyProxyChainExcludedDomain/', params={ - 'idx': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/modifyProxyChainExcludedDomain/', - params: { - 'idx' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/modifyProxyChainExcludedDomain/` - -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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|idx|query|integer|true|none| -|value|query|string|false|none| -|isRegex|query|boolean|false|none| -|isEnabled|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionRemoveProxyChainExcludedDomain - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/removeProxyChainExcludedDomain/?idx=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/removeProxyChainExcludedDomain/?idx=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/removeProxyChainExcludedDomain/', params={ - 'idx': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/removeProxyChainExcludedDomain/', - params: { - 'idx' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/removeProxyChainExcludedDomain/` - -Removes a domain excluded from the outgoing proxy, with the given index. The index can be obtained with the view proxyChainExcludedDomains. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|idx|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionEnableAllProxyChainExcludedDomains - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/enableAllProxyChainExcludedDomains/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/enableAllProxyChainExcludedDomains/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/enableAllProxyChainExcludedDomains/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/enableAllProxyChainExcludedDomains/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/enableAllProxyChainExcludedDomains/` - -Enables all domains excluded from the outgoing proxy. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionDisableAllProxyChainExcludedDomains - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/disableAllProxyChainExcludedDomains/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/disableAllProxyChainExcludedDomains/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/disableAllProxyChainExcludedDomains/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/disableAllProxyChainExcludedDomains/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/disableAllProxyChainExcludedDomains/` - -Disables all domains excluded from the outgoing proxy. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionMaximumAlertInstances - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionMaximumAlertInstances/?numberOfInstances=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionMaximumAlertInstances/?numberOfInstances=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionMaximumAlertInstances/', params={ - 'numberOfInstances': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionMaximumAlertInstances/', - params: { - 'numberOfInstances' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionMaximumAlertInstances/` - -Sets the maximum number of alert instances to include in a report. A value of zero is treated as unlimited. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|numberOfInstances|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionMergeRelatedAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionMergeRelatedAlerts/?enabled=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionMergeRelatedAlerts/?enabled=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionMergeRelatedAlerts/', params={ - 'enabled': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionMergeRelatedAlerts/', - params: { - 'enabled' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionMergeRelatedAlerts/` - -Sets whether or not related alerts will be merged in any reports generated. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|enabled|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionAlertOverridesFilePath - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionAlertOverridesFilePath/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionAlertOverridesFilePath/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionAlertOverridesFilePath/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionAlertOverridesFilePath/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionAlertOverridesFilePath/` - -Sets (or clears, if empty) the path to the file with alert overrides. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|filePath|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionEnablePKCS12ClientCertificate - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/enablePKCS12ClientCertificate/?filePath=string&password=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/enablePKCS12ClientCertificate/?filePath=string&password=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/enablePKCS12ClientCertificate/', params={ - 'filePath': 'string', 'password': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/enablePKCS12ClientCertificate/', - params: { - 'filePath' => 'string', -'password' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/enablePKCS12ClientCertificate/` - -Enables use of a PKCS12 client certificate for the certificate with the given file system path, password, and optional index. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|filePath|query|string|true|none| -|password|query|string|true|none| -|index|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionDisableClientCertificate - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/disableClientCertificate/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/disableClientCertificate/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/disableClientCertificate/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/disableClientCertificate/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/disableClientCertificate/` - -Disables the option for use of client certificates. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionDeleteAllAlerts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/deleteAllAlerts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/deleteAllAlerts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/deleteAllAlerts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/deleteAllAlerts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/deleteAllAlerts/` - -Deletes all alerts of the current session. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionDeleteAlert - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/deleteAlert/?id=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/deleteAlert/?id=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/deleteAlert/', params={ - 'id': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/deleteAlert/', - params: { - 'id' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/deleteAlert/` - -Deletes the alert with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionDefaultUserAgent - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionDefaultUserAgent/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionDefaultUserAgent/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionDefaultUserAgent/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionDefaultUserAgent/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionDefaultUserAgent/` - -Sets the user agent that ZAP should use when creating HTTP messages (for example, spider messages or CONNECT requests to outgoing proxy). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainName/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainName/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainName/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainName/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainName/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainPassword - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainPassword/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainPassword/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainPassword/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainPassword/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainPassword/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainRealm - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainRealm/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainRealm/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainRealm/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainRealm/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainRealm/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainSkipName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainSkipName/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainSkipName/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainSkipName/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainSkipName/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainSkipName/` - -Use actions [add|modify|remove]ProxyChainExcludedDomain instead. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainUserName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainUserName/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainUserName/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainUserName/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainUserName/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainUserName/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionDnsTtlSuccessfulQueries - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionDnsTtlSuccessfulQueries/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionDnsTtlSuccessfulQueries/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionDnsTtlSuccessfulQueries/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionDnsTtlSuccessfulQueries/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionDnsTtlSuccessfulQueries/` - -Sets the TTL (in seconds) of successful DNS queries (applies after ZAP restart). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionHttpStateEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionHttpStateEnabled/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionHttpStateEnabled/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionHttpStateEnabled/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionHttpStateEnabled/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionHttpStateEnabled/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainPort - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainPort/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainPort/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainPort/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainPort/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainPort/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionProxyChainPrompt - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionProxyChainPrompt/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionProxyChainPrompt/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionProxyChainPrompt/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionProxyChainPrompt/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionProxyChainPrompt/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionSingleCookieRequestHeader - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionSingleCookieRequestHeader/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionSingleCookieRequestHeader/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionSingleCookieRequestHeader/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionSingleCookieRequestHeader/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionSingleCookieRequestHeader/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionTimeoutInSecs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionTimeoutInSecs/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionTimeoutInSecs/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionTimeoutInSecs/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionTimeoutInSecs/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionTimeoutInSecs/` - -Sets the connection time out, in seconds. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionUseProxyChain - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionUseProxyChain/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionUseProxyChain/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionUseProxyChain/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionUseProxyChain/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionUseProxyChain/` - -Sets whether or not the outgoing proxy should be used. The address/hostname of the outgoing proxy must be set to enable this option. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreActionSetOptionUseProxyChainAuth - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/core/action/setOptionUseProxyChainAuth/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/core/action/setOptionUseProxyChainAuth/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/core/action/setOptionUseProxyChainAuth/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/core/action/setOptionUseProxyChainAuth/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/core/action/setOptionUseProxyChainAuth/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherProxy.pac - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/proxy.pac/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/proxy.pac/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/proxy.pac/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/proxy.pac/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/proxy.pac/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherRootcert - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/rootcert/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/rootcert/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/rootcert/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/rootcert/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/rootcert/` - -Gets the Root CA certificate used by the local proxies. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherSetproxy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/setproxy/?proxy=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/setproxy/?proxy=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/setproxy/', params={ - 'proxy': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/setproxy/', - params: { - 'proxy' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/setproxy/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|proxy|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherXmlreport - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/xmlreport/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/xmlreport/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/xmlreport/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/xmlreport/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/xmlreport/` - -Generates a report in XML format - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherHtmlreport - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/htmlreport/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/htmlreport/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/htmlreport/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/htmlreport/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/htmlreport/` - -Generates a report in HTML format - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherJsonreport - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/jsonreport/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/jsonreport/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/jsonreport/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/jsonreport/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/jsonreport/` - -Generates a report in JSON format - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherMdreport - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/mdreport/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/mdreport/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/mdreport/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/mdreport/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/mdreport/` - -Generates a report in Markdown format - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherMessageHar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/messageHar/?id=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/messageHar/?id=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/messageHar/', params={ - 'id': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/messageHar/', - params: { - 'id' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/messageHar/` - -Gets the message with the given ID in HAR format - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherMessagesHar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/messagesHar/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/messagesHar/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/messagesHar/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/messagesHar/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/messagesHar/` - -Gets the HTTP messages sent through/by ZAP, in HAR format, optionally filtered by URL and paginated with 'start' position and 'count' of messages - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|baseurl|query|string|false|none| -|start|query|integer|false|none| -|count|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherMessagesHarById - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/messagesHarById/?ids=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/messagesHarById/?ids=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/messagesHarById/', params={ - 'ids': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/messagesHarById/', - params: { - 'ids' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/messagesHarById/` - -Gets the HTTP messages with the given IDs, in HAR format. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## coreOtherSendHarRequest - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/OTHER/core/other/sendHarRequest/?request=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/OTHER/core/other/sendHarRequest/?request=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/OTHER/core/other/sendHarRequest/', params={ - 'request': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/OTHER/core/other/sendHarRequest/', - params: { - 'request' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /OTHER/core/other/sendHarRequest/` - -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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|request|query|string|true|none| -|followRedirects|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

params

- -## paramsViewParams - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/params/view/params/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/params/view/params/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/params/view/params/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/params/view/params/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/params/view/params/` - -Shows the parameters for the specified site, or for all sites if the site is not specified - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

ascan

- -## ascanViewStatus - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/status/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/status/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/status/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/status/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/status/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewScanProgress - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/scanProgress/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/scanProgress/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/scanProgress/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/scanProgress/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/scanProgress/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewMessagesIds - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/messagesIds/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/messagesIds/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/messagesIds/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/messagesIds/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/messagesIds/` - -Gets the IDs of the messages sent during the scan with the given ID. A message can be obtained with 'message' core view. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewAlertsIds - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/alertsIds/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/alertsIds/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/alertsIds/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/alertsIds/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/alertsIds/` - -Gets the IDs of the alerts raised during the scan with the given ID. An alert can be obtained with 'alert' core view. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/scans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/scans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/scans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/scans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/scans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewScanPolicyNames - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/scanPolicyNames/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/scanPolicyNames/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/scanPolicyNames/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/scanPolicyNames/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/scanPolicyNames/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewExcludedFromScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/excludedFromScan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/excludedFromScan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/excludedFromScan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/excludedFromScan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/excludedFromScan/` - -Gets the regexes of URLs excluded from the active scans. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/scanners/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/scanners/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/scanners/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/scanners/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/scanners/` - -Gets the scanners, optionally, of the given scan policy and/or scanner policy/category ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|false|none| -|policyId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewPolicies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/policies/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/policies/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/policies/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/policies/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/policies/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|false|none| -|policyId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewAttackModeQueue - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/attackModeQueue/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/attackModeQueue/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/attackModeQueue/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/attackModeQueue/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/attackModeQueue/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewExcludedParams - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/excludedParams/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/excludedParams/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/excludedParams/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/excludedParams/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/excludedParams/` - -Gets all the parameters that are excluded. For each parameter the following are shown: the name, the URL, and the parameter type. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionExcludedParamList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionExcludedParamList/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionExcludedParamList/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionExcludedParamList/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionExcludedParamList/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionExcludedParamList/` - -Use view excludedParams instead. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewExcludedParamTypes - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/excludedParamTypes/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/excludedParamTypes/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/excludedParamTypes/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/excludedParamTypes/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/excludedParamTypes/` - -Gets all the types of excluded parameters. For each type the following are shown: the ID and the name. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionAttackPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionAttackPolicy/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionAttackPolicy/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionAttackPolicy/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionAttackPolicy/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionAttackPolicy/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionDefaultPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionDefaultPolicy/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionDefaultPolicy/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionDefaultPolicy/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionDefaultPolicy/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionDefaultPolicy/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionDelayInMs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionDelayInMs/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionDelayInMs/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionDelayInMs/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionDelayInMs/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionDelayInMs/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionHandleAntiCSRFTokens - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionHandleAntiCSRFTokens/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionHandleAntiCSRFTokens/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionHandleAntiCSRFTokens/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionHandleAntiCSRFTokens/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionHandleAntiCSRFTokens/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionHostPerScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionHostPerScan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionHostPerScan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionHostPerScan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionHostPerScan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionHostPerScan/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionMaxChartTimeInMins - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionMaxChartTimeInMins/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionMaxChartTimeInMins/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionMaxChartTimeInMins/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionMaxChartTimeInMins/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionMaxChartTimeInMins/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionMaxResultsToList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionMaxResultsToList/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionMaxResultsToList/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionMaxResultsToList/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionMaxResultsToList/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionMaxResultsToList/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionMaxRuleDurationInMins - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionMaxRuleDurationInMins/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionMaxRuleDurationInMins/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionMaxRuleDurationInMins/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionMaxRuleDurationInMins/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionMaxRuleDurationInMins/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionMaxScanDurationInMins - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionMaxScanDurationInMins/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionMaxScanDurationInMins/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionMaxScanDurationInMins/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionMaxScanDurationInMins/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionMaxScanDurationInMins/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionMaxScansInUI - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionMaxScansInUI/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionMaxScansInUI/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionMaxScansInUI/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionMaxScansInUI/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionMaxScansInUI/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionTargetParamsEnabledRPC - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionTargetParamsEnabledRPC/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionTargetParamsEnabledRPC/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionTargetParamsEnabledRPC/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionTargetParamsEnabledRPC/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionTargetParamsEnabledRPC/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionTargetParamsInjectable - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionTargetParamsInjectable/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionTargetParamsInjectable/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionTargetParamsInjectable/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionTargetParamsInjectable/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionTargetParamsInjectable/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionThreadPerHost - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionThreadPerHost/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionThreadPerHost/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionThreadPerHost/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionThreadPerHost/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionThreadPerHost/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionAddQueryParam - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionAddQueryParam/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionAddQueryParam/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionAddQueryParam/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionAddQueryParam/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionAddQueryParam/` - -Tells whether or not the active scanner should add a query parameter to GET request that don't have parameters to start with. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionAllowAttackOnStart - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionAllowAttackOnStart/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionAllowAttackOnStart/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionAllowAttackOnStart/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionAllowAttackOnStart/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionAllowAttackOnStart/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionInjectPluginIdInHeader - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionInjectPluginIdInHeader/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionInjectPluginIdInHeader/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionInjectPluginIdInHeader/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionInjectPluginIdInHeader/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionInjectPluginIdInHeader/` - -Tells whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID, with the ID of the scanner that's sending the requests. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionPromptInAttackMode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionPromptInAttackMode/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionPromptInAttackMode/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionPromptInAttackMode/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionPromptInAttackMode/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionPromptInAttackMode/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionPromptToClearFinishedScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionPromptToClearFinishedScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionPromptToClearFinishedScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionPromptToClearFinishedScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionPromptToClearFinishedScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionPromptToClearFinishedScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionRescanInAttackMode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionRescanInAttackMode/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionRescanInAttackMode/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionRescanInAttackMode/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionRescanInAttackMode/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionRescanInAttackMode/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionScanHeadersAllRequests - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionScanHeadersAllRequests/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionScanHeadersAllRequests/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionScanHeadersAllRequests/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionScanHeadersAllRequests/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionScanHeadersAllRequests/` - -Tells whether or not the HTTP Headers of all requests should be scanned. Not just requests that send parameters, through the query or request body. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanViewOptionShowAdvancedDialog - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/view/optionShowAdvancedDialog/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/view/optionShowAdvancedDialog/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/view/optionShowAdvancedDialog/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/view/optionShowAdvancedDialog/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/view/optionShowAdvancedDialog/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/scan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/scan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/scan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/scan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/scan/` - -Runs the active scanner against the given URL and/or Context. Optionally, the 'recurse' parameter can be used to scan URLs under the given URL, the parameter 'inScopeOnly' can be used to constrain the scan to URLs that are in scope (ignored if a Context is specified), the parameter 'scanPolicyName' allows to specify the scan policy (if none is given it uses the default scan policy), the parameters 'method' and 'postData' allow to select a given request in conjunction with the given URL. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|false|none| -|recurse|query|boolean|false|none| -|inScopeOnly|query|boolean|false|none| -|scanPolicyName|query|string|false|none| -|method|query|string|false|none| -|postData|query|string|false|none| -|contextId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionScanAsUser - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/scanAsUser/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/scanAsUser/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/scanAsUser/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/scanAsUser/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/scanAsUser/` - -Active Scans from the perspective of a User, obtained using the given Context ID and User ID. See 'scan' action for more details. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|url|query|string|false|none| -|contextId|query|integer|false|none| -|userId|query|integer|false|none| -|recurse|query|boolean|false|none| -|scanPolicyName|query|string|false|none| -|method|query|string|false|none| -|postData|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionPause - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/pause/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/pause/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/pause/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/pause/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/pause/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionResume - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/resume/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/resume/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/resume/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/resume/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/resume/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionStop - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/stop/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/stop/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/stop/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/stop/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/stop/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionRemoveScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/removeScan/?scanId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/removeScan/?scanId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/removeScan/', params={ - 'scanId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/removeScan/', - params: { - 'scanId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/removeScan/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionPauseAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/pauseAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/pauseAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/pauseAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/pauseAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/pauseAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionResumeAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/resumeAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/resumeAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/resumeAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/resumeAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/resumeAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionStopAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/stopAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/stopAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/stopAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/stopAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/stopAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionRemoveAllScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/removeAllScans/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/removeAllScans/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/removeAllScans/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/removeAllScans/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/removeAllScans/` - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionClearExcludedFromScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/clearExcludedFromScan/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/clearExcludedFromScan/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/clearExcludedFromScan/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/clearExcludedFromScan/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/clearExcludedFromScan/` - -Clears the regexes of URLs excluded from the active scans. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionExcludeFromScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/excludeFromScan/?regex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/excludeFromScan/?regex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/excludeFromScan/', params={ - 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/excludeFromScan/', - params: { - 'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/excludeFromScan/` - -Adds a regex of URLs that should be excluded from the active scans. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|regex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionEnableAllScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/enableAllScanners/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/enableAllScanners/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/enableAllScanners/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/enableAllScanners/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/enableAllScanners/` - -Enables all scanners of the scan policy with the given name, or the default if none given. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionDisableAllScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/disableAllScanners/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/disableAllScanners/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/disableAllScanners/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/disableAllScanners/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/disableAllScanners/` - -Disables all scanners of the scan policy with the given name, or the default if none given. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionEnableScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/enableScanners/?ids=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/enableScanners/?ids=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/enableScanners/', params={ - 'ids': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/enableScanners/', - params: { - 'ids' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/enableScanners/` - -Enables the scanners with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionDisableScanners - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/disableScanners/?ids=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/disableScanners/?ids=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/disableScanners/', params={ - 'ids': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/disableScanners/', - params: { - 'ids' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/disableScanners/` - -Disables the scanners with the given IDs (comma separated list of IDs) of the scan policy with the given name, or the default if none given. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetEnabledPolicies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setEnabledPolicies/?ids=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setEnabledPolicies/?ids=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setEnabledPolicies/', params={ - 'ids': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setEnabledPolicies/', - params: { - 'ids' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setEnabledPolicies/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|ids|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetPolicyAttackStrength - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setPolicyAttackStrength/?id=0&attackStrength=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setPolicyAttackStrength/?id=0&attackStrength=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setPolicyAttackStrength/', params={ - 'id': '0', 'attackStrength': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setPolicyAttackStrength/', - params: { - 'id' => 'integer', -'attackStrength' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setPolicyAttackStrength/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| -|attackStrength|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetPolicyAlertThreshold - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setPolicyAlertThreshold/?id=0&alertThreshold=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setPolicyAlertThreshold/?id=0&alertThreshold=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setPolicyAlertThreshold/', params={ - 'id': '0', 'alertThreshold': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setPolicyAlertThreshold/', - params: { - 'id' => 'integer', -'alertThreshold' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setPolicyAlertThreshold/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| -|alertThreshold|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetScannerAttackStrength - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setScannerAttackStrength/?id=0&attackStrength=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setScannerAttackStrength/?id=0&attackStrength=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setScannerAttackStrength/', params={ - 'id': '0', 'attackStrength': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setScannerAttackStrength/', - params: { - 'id' => 'integer', -'attackStrength' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setScannerAttackStrength/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| -|attackStrength|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetScannerAlertThreshold - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setScannerAlertThreshold/?id=0&alertThreshold=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setScannerAlertThreshold/?id=0&alertThreshold=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setScannerAlertThreshold/', params={ - 'id': '0', 'alertThreshold': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setScannerAlertThreshold/', - params: { - 'id' => 'integer', -'alertThreshold' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setScannerAlertThreshold/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|id|query|integer|true|none| -|alertThreshold|query|string|true|none| -|scanPolicyName|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionAddScanPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/addScanPolicy/?scanPolicyName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/addScanPolicy/?scanPolicyName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/addScanPolicy/', params={ - 'scanPolicyName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/addScanPolicy/', - params: { - 'scanPolicyName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/addScanPolicy/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|true|none| -|alertThreshold|query|string|false|none| -|attackStrength|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionRemoveScanPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/removeScanPolicy/?scanPolicyName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/removeScanPolicy/?scanPolicyName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/removeScanPolicy/', params={ - 'scanPolicyName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/removeScanPolicy/', - params: { - 'scanPolicyName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/removeScanPolicy/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionUpdateScanPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/updateScanPolicy/?scanPolicyName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/updateScanPolicy/?scanPolicyName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/updateScanPolicy/', params={ - 'scanPolicyName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/updateScanPolicy/', - params: { - 'scanPolicyName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/updateScanPolicy/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanPolicyName|query|string|true|none| -|alertThreshold|query|string|false|none| -|attackStrength|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionImportScanPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/importScanPolicy/?path=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/importScanPolicy/?path=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/importScanPolicy/', params={ - 'path': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/importScanPolicy/', - params: { - 'path' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/importScanPolicy/` - -Imports a Scan Policy using the given file system path. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|path|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionAddExcludedParam - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/addExcludedParam/?name=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/addExcludedParam/?name=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/addExcludedParam/', params={ - 'name': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/addExcludedParam/', - params: { - 'name' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/addExcludedParam/` - -Adds a new parameter excluded from the scan, using the specified name. Optionally sets if the new entry applies to a specific URL (default, all URLs) and sets the ID of the type of the parameter (default, ID of any type). The type IDs can be obtained with the view excludedParamTypes. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|name|query|string|true|none| -|type|query|string|false|none| -|url|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionModifyExcludedParam - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/modifyExcludedParam/?idx=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/modifyExcludedParam/?idx=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/modifyExcludedParam/', params={ - 'idx': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/modifyExcludedParam/', - params: { - 'idx' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/modifyExcludedParam/` - -Modifies a parameter excluded from the scan. Allows to modify the name, the URL and the type of parameter. The parameter is selected with its index, which can be obtained with the view excludedParams. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|idx|query|integer|true|none| -|name|query|string|false|none| -|type|query|string|false|none| -|url|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionRemoveExcludedParam - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/removeExcludedParam/?idx=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/removeExcludedParam/?idx=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/removeExcludedParam/', params={ - 'idx': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/removeExcludedParam/', - params: { - 'idx' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/removeExcludedParam/` - -Removes a parameter excluded from the scan, with the given index. The index can be obtained with the view excludedParams. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|idx|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSkipScanner - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/skipScanner/?scanId=0&scannerId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/skipScanner/?scanId=0&scannerId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/skipScanner/', params={ - 'scanId': '0', 'scannerId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/skipScanner/', - params: { - 'scanId' => 'integer', -'scannerId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/skipScanner/` - -Skips the scanner using the given IDs of the scan and the scanner. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scanId|query|integer|true|none| -|scannerId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionAttackPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionAttackPolicy/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionAttackPolicy/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionAttackPolicy/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionAttackPolicy/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionAttackPolicy/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionDefaultPolicy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionDefaultPolicy/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionDefaultPolicy/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionDefaultPolicy/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionDefaultPolicy/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionDefaultPolicy/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionAddQueryParam - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionAddQueryParam/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionAddQueryParam/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionAddQueryParam/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionAddQueryParam/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionAddQueryParam/` - -Sets whether or not the active scanner should add a query param to GET requests which do not have parameters to start with. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionAllowAttackOnStart - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionAllowAttackOnStart/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionAllowAttackOnStart/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionAllowAttackOnStart/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionAllowAttackOnStart/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionAllowAttackOnStart/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionDelayInMs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionDelayInMs/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionDelayInMs/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionDelayInMs/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionDelayInMs/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionDelayInMs/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionHandleAntiCSRFTokens - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionHandleAntiCSRFTokens/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionHandleAntiCSRFTokens/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionHandleAntiCSRFTokens/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionHandleAntiCSRFTokens/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionHandleAntiCSRFTokens/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionHostPerScan - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionHostPerScan/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionHostPerScan/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionHostPerScan/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionHostPerScan/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionHostPerScan/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionInjectPluginIdInHeader - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionInjectPluginIdInHeader/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionInjectPluginIdInHeader/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionInjectPluginIdInHeader/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionInjectPluginIdInHeader/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionInjectPluginIdInHeader/` - -Sets whether or not the active scanner should inject the HTTP request header X-ZAP-Scan-ID, with the ID of the scanner that's sending the requests. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionMaxChartTimeInMins - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionMaxChartTimeInMins/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionMaxChartTimeInMins/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionMaxChartTimeInMins/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionMaxChartTimeInMins/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionMaxChartTimeInMins/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionMaxResultsToList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionMaxResultsToList/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionMaxResultsToList/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionMaxResultsToList/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionMaxResultsToList/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionMaxResultsToList/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionMaxRuleDurationInMins - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionMaxRuleDurationInMins/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionMaxRuleDurationInMins/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionMaxRuleDurationInMins/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionMaxRuleDurationInMins/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionMaxRuleDurationInMins/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionMaxScanDurationInMins - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionMaxScanDurationInMins/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionMaxScanDurationInMins/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionMaxScanDurationInMins/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionMaxScanDurationInMins/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionMaxScanDurationInMins/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionMaxScansInUI - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionMaxScansInUI/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionMaxScansInUI/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionMaxScansInUI/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionMaxScansInUI/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionMaxScansInUI/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionPromptInAttackMode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionPromptInAttackMode/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionPromptInAttackMode/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionPromptInAttackMode/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionPromptInAttackMode/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionPromptInAttackMode/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionPromptToClearFinishedScans - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionPromptToClearFinishedScans/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionPromptToClearFinishedScans/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionPromptToClearFinishedScans/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionPromptToClearFinishedScans/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionPromptToClearFinishedScans/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionRescanInAttackMode - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionRescanInAttackMode/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionRescanInAttackMode/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionRescanInAttackMode/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionRescanInAttackMode/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionRescanInAttackMode/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionScanHeadersAllRequests - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionScanHeadersAllRequests/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionScanHeadersAllRequests/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionScanHeadersAllRequests/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionScanHeadersAllRequests/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionScanHeadersAllRequests/` - -Sets whether or not the HTTP Headers of all requests should be scanned. Not just requests that send parameters, through the query or request body. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionShowAdvancedDialog - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionShowAdvancedDialog/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionShowAdvancedDialog/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionShowAdvancedDialog/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionShowAdvancedDialog/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionShowAdvancedDialog/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionTargetParamsEnabledRPC - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionTargetParamsEnabledRPC/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionTargetParamsEnabledRPC/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionTargetParamsEnabledRPC/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionTargetParamsEnabledRPC/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionTargetParamsEnabledRPC/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionTargetParamsInjectable - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionTargetParamsInjectable/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionTargetParamsInjectable/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionTargetParamsInjectable/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionTargetParamsInjectable/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionTargetParamsInjectable/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ascanActionSetOptionThreadPerHost - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ascan/action/setOptionThreadPerHost/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ascan/action/setOptionThreadPerHost/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ascan/action/setOptionThreadPerHost/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ascan/action/setOptionThreadPerHost/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ascan/action/setOptionThreadPerHost/` - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

context

- -## contextViewContextList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/contextList/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/contextList/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/contextList/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/contextList/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/contextList/` - -List context names of current session - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewExcludeRegexs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/excludeRegexs/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/excludeRegexs/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/excludeRegexs/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/excludeRegexs/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/excludeRegexs/` - -List excluded regexs for context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewIncludeRegexs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/includeRegexs/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/includeRegexs/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/includeRegexs/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/includeRegexs/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/includeRegexs/` - -List included regexs for context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/context/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/context/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/context/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/context/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/context/` - -List the information about the named context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewTechnologyList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/technologyList/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/technologyList/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/technologyList/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/technologyList/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/technologyList/` - -Lists the names of all built in technologies - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewIncludedTechnologyList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/includedTechnologyList/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/includedTechnologyList/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/includedTechnologyList/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/includedTechnologyList/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/includedTechnologyList/` - -Lists the names of all technologies included in a context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewExcludedTechnologyList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/excludedTechnologyList/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/excludedTechnologyList/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/excludedTechnologyList/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/excludedTechnologyList/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/excludedTechnologyList/` - -Lists the names of all technologies excluded from a context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextViewUrls - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/view/urls/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/view/urls/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/view/urls/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/view/urls/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/view/urls/` - -Lists the URLs accessed through/by ZAP, that belong to the context with the given name. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionExcludeFromContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/excludeFromContext/?contextName=string®ex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/excludeFromContext/?contextName=string®ex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/excludeFromContext/', params={ - 'contextName': 'string', 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/excludeFromContext/', - params: { - 'contextName' => 'string', -'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/excludeFromContext/` - -Add exclude regex to context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|regex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionIncludeInContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/includeInContext/?contextName=string®ex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/includeInContext/?contextName=string®ex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/includeInContext/', params={ - 'contextName': 'string', 'regex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/includeInContext/', - params: { - 'contextName' => 'string', -'regex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/includeInContext/` - -Add include regex to context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|regex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionSetContextRegexs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/setContextRegexs/?contextName=string&incRegexs=string&excRegexs=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/setContextRegexs/?contextName=string&incRegexs=string&excRegexs=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/setContextRegexs/', params={ - 'contextName': 'string', 'incRegexs': 'string', 'excRegexs': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/setContextRegexs/', - params: { - 'contextName' => 'string', -'incRegexs' => 'string', -'excRegexs' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/setContextRegexs/` - -Set the regexs to include and exclude for a context, both supplied as JSON string arrays - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|incRegexs|query|string|true|none| -|excRegexs|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionNewContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/newContext/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/newContext/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/newContext/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/newContext/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/newContext/` - -Creates a new context with the given name in the current session - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionRemoveContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/removeContext/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/removeContext/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/removeContext/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/removeContext/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/removeContext/` - -Removes a context in the current session - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionExportContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/exportContext/?contextName=string&contextFile=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/exportContext/?contextName=string&contextFile=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/exportContext/', params={ - 'contextName': 'string', 'contextFile': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/exportContext/', - params: { - 'contextName' => 'string', -'contextFile' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/exportContext/` - -Exports the context with the given name to a file. If a relative file path is specified it will be resolved against the "contexts" directory in ZAP "home" dir. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|contextFile|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionImportContext - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/importContext/?contextFile=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/importContext/?contextFile=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/importContext/', params={ - 'contextFile': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/importContext/', - params: { - 'contextFile' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/importContext/` - -Imports a context from a file. If a relative file path is specified it will be resolved against the "contexts" directory in ZAP "home" dir. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextFile|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionIncludeContextTechnologies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/includeContextTechnologies/?contextName=string&technologyNames=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/includeContextTechnologies/?contextName=string&technologyNames=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/includeContextTechnologies/', params={ - 'contextName': 'string', 'technologyNames': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/includeContextTechnologies/', - params: { - 'contextName' => 'string', -'technologyNames' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/includeContextTechnologies/` - -Includes technologies with the given names, separated by a comma, to a context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|technologyNames|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionIncludeAllContextTechnologies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/includeAllContextTechnologies/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/includeAllContextTechnologies/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/includeAllContextTechnologies/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/includeAllContextTechnologies/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/includeAllContextTechnologies/` - -Includes all built in technologies in to a context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionExcludeContextTechnologies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/excludeContextTechnologies/?contextName=string&technologyNames=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/excludeContextTechnologies/?contextName=string&technologyNames=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/excludeContextTechnologies/', params={ - 'contextName': 'string', 'technologyNames': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/excludeContextTechnologies/', - params: { - 'contextName' => 'string', -'technologyNames' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/excludeContextTechnologies/` - -Excludes technologies with the given names, separated by a comma, from a context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|technologyNames|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionExcludeAllContextTechnologies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/excludeAllContextTechnologies/?contextName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/excludeAllContextTechnologies/?contextName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/excludeAllContextTechnologies/', params={ - 'contextName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/excludeAllContextTechnologies/', - params: { - 'contextName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/excludeAllContextTechnologies/` - -Excludes all built in technologies from a context - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## contextActionSetContextInScope - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/context/action/setContextInScope/?contextName=string&booleanInScope=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/context/action/setContextInScope/?contextName=string&booleanInScope=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/context/action/setContextInScope/', params={ - 'contextName': 'string', 'booleanInScope': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/context/action/setContextInScope/', - params: { - 'contextName' => 'string', -'booleanInScope' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/context/action/setContextInScope/` - -Sets a context to in scope (contexts are in scope by default) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextName|query|string|true|none| -|booleanInScope|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

httpSessions

- -## httpSessionsViewSites - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/view/sites/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/view/sites/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/view/sites/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/view/sites/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/view/sites/` - -Gets all of the sites that have sessions. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsViewSessions - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/view/sessions/?site=string&session=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/view/sessions/?site=string&session=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/view/sessions/', params={ - 'site': 'string', 'session': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/view/sessions/', - params: { - 'site' => 'string', -'session' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/view/sessions/` - -Gets the sessions for the given site. Optionally returning just the session with the given name. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|session|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsViewActiveSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/view/activeSession/?site=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/view/activeSession/?site=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/view/activeSession/', params={ - 'site': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/view/activeSession/', - params: { - 'site' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/view/activeSession/` - -Gets the name of the active session for the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsViewSessionTokens - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/view/sessionTokens/?site=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/view/sessionTokens/?site=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/view/sessionTokens/', params={ - 'site': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/view/sessionTokens/', - params: { - 'site' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/view/sessionTokens/` - -Gets the names of the session tokens for the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsViewDefaultSessionTokens - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/view/defaultSessionTokens/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/view/defaultSessionTokens/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/view/defaultSessionTokens/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/view/defaultSessionTokens/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/view/defaultSessionTokens/` - -Gets the default session tokens. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionCreateEmptySession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/createEmptySession/?site=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/createEmptySession/?site=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/createEmptySession/', params={ - 'site': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/createEmptySession/', - params: { - 'site' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/createEmptySession/` - -Creates an empty session for the given site. Optionally with the given name. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|session|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionRemoveSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/removeSession/?site=string&session=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/removeSession/?site=string&session=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/removeSession/', params={ - 'site': 'string', 'session': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/removeSession/', - params: { - 'site' => 'string', -'session' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/removeSession/` - -Removes the session from the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|session|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionSetActiveSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/setActiveSession/?site=string&session=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/setActiveSession/?site=string&session=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/setActiveSession/', params={ - 'site': 'string', 'session': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/setActiveSession/', - params: { - 'site' => 'string', -'session' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/setActiveSession/` - -Sets the given session as active for the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|session|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionUnsetActiveSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/unsetActiveSession/?site=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/unsetActiveSession/?site=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/unsetActiveSession/', params={ - 'site': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/unsetActiveSession/', - params: { - 'site' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/unsetActiveSession/` - -Unsets the active session of the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionAddSessionToken - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/addSessionToken/?site=string&sessionToken=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/addSessionToken/?site=string&sessionToken=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/addSessionToken/', params={ - 'site': 'string', 'sessionToken': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/addSessionToken/', - params: { - 'site' => 'string', -'sessionToken' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/addSessionToken/` - -Adds the session token to the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|sessionToken|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionRemoveSessionToken - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/removeSessionToken/?site=string&sessionToken=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/removeSessionToken/?site=string&sessionToken=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/removeSessionToken/', params={ - 'site': 'string', 'sessionToken': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/removeSessionToken/', - params: { - 'site' => 'string', -'sessionToken' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/removeSessionToken/` - -Removes the session token from the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|sessionToken|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionSetSessionTokenValue - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/setSessionTokenValue/?site=string&session=string&sessionToken=string&tokenValue=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/setSessionTokenValue/?site=string&session=string&sessionToken=string&tokenValue=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/setSessionTokenValue/', params={ - 'site': 'string', 'session': 'string', 'sessionToken': 'string', 'tokenValue': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/setSessionTokenValue/', - params: { - 'site' => 'string', -'session' => 'string', -'sessionToken' => 'string', -'tokenValue' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/setSessionTokenValue/` - -Sets the value of the session token of the given session for the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|session|query|string|true|none| -|sessionToken|query|string|true|none| -|tokenValue|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionRenameSession - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/renameSession/?site=string&oldSessionName=string&newSessionName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/renameSession/?site=string&oldSessionName=string&newSessionName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/renameSession/', params={ - 'site': 'string', 'oldSessionName': 'string', 'newSessionName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/renameSession/', - params: { - 'site' => 'string', -'oldSessionName' => 'string', -'newSessionName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/renameSession/` - -Renames the session of the given site. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|oldSessionName|query|string|true|none| -|newSessionName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionAddDefaultSessionToken - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/addDefaultSessionToken/?sessionToken=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/addDefaultSessionToken/?sessionToken=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/addDefaultSessionToken/', params={ - 'sessionToken': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/addDefaultSessionToken/', - params: { - 'sessionToken' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/addDefaultSessionToken/` - -Adds a default session token with the given name and enabled state. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|sessionToken|query|string|true|none| -|tokenEnabled|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionSetDefaultSessionTokenEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/setDefaultSessionTokenEnabled/?sessionToken=string&tokenEnabled=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/setDefaultSessionTokenEnabled/?sessionToken=string&tokenEnabled=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/setDefaultSessionTokenEnabled/', params={ - 'sessionToken': 'string', 'tokenEnabled': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/setDefaultSessionTokenEnabled/', - params: { - 'sessionToken' => 'string', -'tokenEnabled' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/setDefaultSessionTokenEnabled/` - -Sets whether or not the default session token with the given name is enabled. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|sessionToken|query|string|true|none| -|tokenEnabled|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## httpSessionsActionRemoveDefaultSessionToken - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/httpSessions/action/removeDefaultSessionToken/?sessionToken=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/httpSessions/action/removeDefaultSessionToken/?sessionToken=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/httpSessions/action/removeDefaultSessionToken/', params={ - 'sessionToken': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/httpSessions/action/removeDefaultSessionToken/', - params: { - 'sessionToken' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/httpSessions/action/removeDefaultSessionToken/` - -Removes the default session token with the given name. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|sessionToken|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

break

- -## breakViewIsBreakAll - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/view/isBreakAll/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/view/isBreakAll/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/view/isBreakAll/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/view/isBreakAll/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/view/isBreakAll/` - -Returns True if ZAP will break on both requests and responses - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakViewIsBreakRequest - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/view/isBreakRequest/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/view/isBreakRequest/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/view/isBreakRequest/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/view/isBreakRequest/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/view/isBreakRequest/` - -Returns True if ZAP will break on requests - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakViewIsBreakResponse - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/view/isBreakResponse/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/view/isBreakResponse/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/view/isBreakResponse/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/view/isBreakResponse/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/view/isBreakResponse/` - -Returns True if ZAP will break on responses - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakViewHttpMessage - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/view/httpMessage/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/view/httpMessage/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/view/httpMessage/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/view/httpMessage/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/view/httpMessage/` - -Returns the HTTP message currently intercepted (if any) - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionBreak - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/break/?type=string&state=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/break/?type=string&state=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/break/', params={ - 'type': 'string', 'state': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/break/', - params: { - 'type' => 'string', -'state' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/break/` - -Controls the global break functionality. The type may be one of: http-all, http-request or http-response. The state may be true (for turning break on for the specified type) or false (for turning break off). Scope is not currently used. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|type|query|string|true|none| -|state|query|string|true|none| -|scope|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionSetHttpMessage - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/setHttpMessage/?httpHeader=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/setHttpMessage/?httpHeader=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/setHttpMessage/', params={ - 'httpHeader': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/setHttpMessage/', - params: { - 'httpHeader' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/setHttpMessage/` - -Overwrites the currently intercepted message with the data provided - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|httpHeader|query|string|true|none| -|httpBody|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionContinue - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/continue/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/continue/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/continue/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/continue/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/continue/` - -Submits the currently intercepted message and unsets the global request/response break points - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionStep - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/step/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/step/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/step/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/step/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/step/` - -Submits the currently intercepted message, the next request or response will automatically be intercepted - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionDrop - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/drop/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/drop/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/drop/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/drop/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/drop/` - -Drops the currently intercepted message - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionAddHttpBreakpoint - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/addHttpBreakpoint/?string=string&location=string&match=string&inverse=true&ignorecase=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/addHttpBreakpoint/?string=string&location=string&match=string&inverse=true&ignorecase=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/addHttpBreakpoint/', params={ - 'string': 'string', 'location': 'string', 'match': 'string', 'inverse': 'true', 'ignorecase': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/addHttpBreakpoint/', - params: { - 'string' => 'string', -'location' => 'string', -'match' => 'string', -'inverse' => 'boolean', -'ignorecase' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/addHttpBreakpoint/` - -Adds a custom HTTP breakpoint. The string is the string to match. Location may be one of: url, request_header, request_body, response_header or response_body. Match may be: contains or regex. Inverse (match) may be true or false. Lastly, ignorecase (when matching the string) may be true or false. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|string|query|string|true|none| -|location|query|string|true|none| -|match|query|string|true|none| -|inverse|query|boolean|true|none| -|ignorecase|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## breakActionRemoveHttpBreakpoint - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/break/action/removeHttpBreakpoint/?string=string&location=string&match=string&inverse=true&ignorecase=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/break/action/removeHttpBreakpoint/?string=string&location=string&match=string&inverse=true&ignorecase=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/break/action/removeHttpBreakpoint/', params={ - 'string': 'string', 'location': 'string', 'match': 'string', 'inverse': 'true', 'ignorecase': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/break/action/removeHttpBreakpoint/', - params: { - 'string' => 'string', -'location' => 'string', -'match' => 'string', -'inverse' => 'boolean', -'ignorecase' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/break/action/removeHttpBreakpoint/` - -Removes the specified break point - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|string|query|string|true|none| -|location|query|string|true|none| -|match|query|string|true|none| -|inverse|query|boolean|true|none| -|ignorecase|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

authentication

- -## authenticationViewGetSupportedAuthenticationMethods - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/view/getSupportedAuthenticationMethods/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/view/getSupportedAuthenticationMethods/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/view/getSupportedAuthenticationMethods/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/view/getSupportedAuthenticationMethods/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/view/getSupportedAuthenticationMethods/` - -Gets the name of the authentication methods. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationViewGetAuthenticationMethodConfigParams - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/view/getAuthenticationMethodConfigParams/?authMethodName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/view/getAuthenticationMethodConfigParams/?authMethodName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/view/getAuthenticationMethodConfigParams/', params={ - 'authMethodName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/view/getAuthenticationMethodConfigParams/', - params: { - 'authMethodName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/view/getAuthenticationMethodConfigParams/` - -Gets the configuration parameters for the authentication method with the given name. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|authMethodName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationViewGetAuthenticationMethod - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/view/getAuthenticationMethod/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/view/getAuthenticationMethod/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/view/getAuthenticationMethod/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/view/getAuthenticationMethod/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/view/getAuthenticationMethod/` - -Gets the name of the authentication method for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationViewGetLoggedInIndicator - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/view/getLoggedInIndicator/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/view/getLoggedInIndicator/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/view/getLoggedInIndicator/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/view/getLoggedInIndicator/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/view/getLoggedInIndicator/` - -Gets the logged in indicator for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationViewGetLoggedOutIndicator - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/view/getLoggedOutIndicator/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/view/getLoggedOutIndicator/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/view/getLoggedOutIndicator/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/view/getLoggedOutIndicator/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/view/getLoggedOutIndicator/` - -Gets the logged out indicator for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationActionSetAuthenticationMethod - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/action/setAuthenticationMethod/?contextId=0&authMethodName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/action/setAuthenticationMethod/?contextId=0&authMethodName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/action/setAuthenticationMethod/', params={ - 'contextId': '0', 'authMethodName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/action/setAuthenticationMethod/', - params: { - 'contextId' => 'integer', -'authMethodName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/action/setAuthenticationMethod/` - -Sets the authentication method for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|authMethodName|query|string|true|none| -|authMethodConfigParams|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationActionSetLoggedInIndicator - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/action/setLoggedInIndicator/?contextId=0&loggedInIndicatorRegex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/action/setLoggedInIndicator/?contextId=0&loggedInIndicatorRegex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/action/setLoggedInIndicator/', params={ - 'contextId': '0', 'loggedInIndicatorRegex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/action/setLoggedInIndicator/', - params: { - 'contextId' => 'integer', -'loggedInIndicatorRegex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/action/setLoggedInIndicator/` - -Sets the logged in indicator for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|loggedInIndicatorRegex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authenticationActionSetLoggedOutIndicator - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authentication/action/setLoggedOutIndicator/?contextId=0&loggedOutIndicatorRegex=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authentication/action/setLoggedOutIndicator/?contextId=0&loggedOutIndicatorRegex=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authentication/action/setLoggedOutIndicator/', params={ - 'contextId': '0', 'loggedOutIndicatorRegex': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authentication/action/setLoggedOutIndicator/', - params: { - 'contextId' => 'integer', -'loggedOutIndicatorRegex' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authentication/action/setLoggedOutIndicator/` - -Sets the logged out indicator for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|loggedOutIndicatorRegex|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

authorization

- -## authorizationViewGetAuthorizationDetectionMethod - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authorization/view/getAuthorizationDetectionMethod/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authorization/view/getAuthorizationDetectionMethod/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authorization/view/getAuthorizationDetectionMethod/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authorization/view/getAuthorizationDetectionMethod/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authorization/view/getAuthorizationDetectionMethod/` - -Obtains all the configuration of the authorization detection method that is currently set for a context. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## authorizationActionSetBasicAuthorizationDetectionMethod - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/authorization/action/setBasicAuthorizationDetectionMethod/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/authorization/action/setBasicAuthorizationDetectionMethod/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/authorization/action/setBasicAuthorizationDetectionMethod/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/authorization/action/setBasicAuthorizationDetectionMethod/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/authorization/action/setBasicAuthorizationDetectionMethod/` - -Sets the authorization detection method for a context as one that identifies un-authorized messages based on: the message's status code or a regex pattern in the response's header or body. Also, whether all conditions must match or just some can be specified via the logicalOperator parameter, which accepts two values: "AND" (default), "OR". - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|headerRegex|query|string|false|none| -|bodyRegex|query|string|false|none| -|statusCode|query|string|false|none| -|logicalOperator|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

localProxies

- -## localProxiesViewAdditionalProxies - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/localProxies/view/additionalProxies/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/localProxies/view/additionalProxies/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/localProxies/view/additionalProxies/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/localProxies/view/additionalProxies/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/localProxies/view/additionalProxies/` - -Gets all of the additional proxies that have been configured. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## localProxiesActionAddAdditionalProxy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/localProxies/action/addAdditionalProxy/?address=string&port=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/localProxies/action/addAdditionalProxy/?address=string&port=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/localProxies/action/addAdditionalProxy/', params={ - 'address': 'string', 'port': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/localProxies/action/addAdditionalProxy/', - params: { - 'address' => 'string', -'port' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/localProxies/action/addAdditionalProxy/` - -Adds an new proxy using the details supplied. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|address|query|string|true|none| -|port|query|integer|true|none| -|behindNat|query|boolean|false|none| -|alwaysDecodeZip|query|boolean|false|none| -|removeUnsupportedEncodings|query|boolean|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## localProxiesActionRemoveAdditionalProxy - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/localProxies/action/removeAdditionalProxy/?address=string&port=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/localProxies/action/removeAdditionalProxy/?address=string&port=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/localProxies/action/removeAdditionalProxy/', params={ - 'address': 'string', 'port': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/localProxies/action/removeAdditionalProxy/', - params: { - 'address' => 'string', -'port' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/localProxies/action/removeAdditionalProxy/` - -Removes the additional proxy with the specified address and port. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|address|query|string|true|none| -|port|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

ruleConfig

- -## ruleConfigViewRuleConfigValue - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ruleConfig/view/ruleConfigValue/?key=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ruleConfig/view/ruleConfigValue/?key=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ruleConfig/view/ruleConfigValue/', params={ - 'key': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ruleConfig/view/ruleConfigValue/', - params: { - 'key' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ruleConfig/view/ruleConfigValue/` - -Show the specified rule configuration - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|key|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ruleConfigViewAllRuleConfigs - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ruleConfig/view/allRuleConfigs/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ruleConfig/view/allRuleConfigs/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ruleConfig/view/allRuleConfigs/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ruleConfig/view/allRuleConfigs/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ruleConfig/view/allRuleConfigs/` - -Show all of the rule configurations - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ruleConfigActionResetRuleConfigValue - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ruleConfig/action/resetRuleConfigValue/?key=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ruleConfig/action/resetRuleConfigValue/?key=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ruleConfig/action/resetRuleConfigValue/', params={ - 'key': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ruleConfig/action/resetRuleConfigValue/', - params: { - 'key' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ruleConfig/action/resetRuleConfigValue/` - -Reset the specified rule configuration, which must already exist - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|key|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ruleConfigActionResetAllRuleConfigValues - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ruleConfig/action/resetAllRuleConfigValues/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ruleConfig/action/resetAllRuleConfigValues/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ruleConfig/action/resetAllRuleConfigValues/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ruleConfig/action/resetAllRuleConfigValues/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ruleConfig/action/resetAllRuleConfigValues/` - -Reset all of the rule configurations - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## ruleConfigActionSetRuleConfigValue - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/ruleConfig/action/setRuleConfigValue/?key=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/ruleConfig/action/setRuleConfigValue/?key=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/ruleConfig/action/setRuleConfigValue/', params={ - 'key': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/ruleConfig/action/setRuleConfigValue/', - params: { - 'key' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/ruleConfig/action/setRuleConfigValue/` - -Set the specified rule configuration, which must already exist - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|key|query|string|true|none| -|value|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

sessionManagement

- -## sessionManagementViewGetSupportedSessionManagementMethods - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/sessionManagement/view/getSupportedSessionManagementMethods/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/sessionManagement/view/getSupportedSessionManagementMethods/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/sessionManagement/view/getSupportedSessionManagementMethods/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/sessionManagement/view/getSupportedSessionManagementMethods/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/sessionManagement/view/getSupportedSessionManagementMethods/` - -Gets the name of the session management methods. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## sessionManagementViewGetSessionManagementMethodConfigParams - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/sessionManagement/view/getSessionManagementMethodConfigParams/?methodName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/sessionManagement/view/getSessionManagementMethodConfigParams/?methodName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/sessionManagement/view/getSessionManagementMethodConfigParams/', params={ - 'methodName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/sessionManagement/view/getSessionManagementMethodConfigParams/', - params: { - 'methodName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/sessionManagement/view/getSessionManagementMethodConfigParams/` - -Gets the configuration parameters for the session management method with the given name. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|methodName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## sessionManagementViewGetSessionManagementMethod - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/sessionManagement/view/getSessionManagementMethod/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/sessionManagement/view/getSessionManagementMethod/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/sessionManagement/view/getSessionManagementMethod/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/sessionManagement/view/getSessionManagementMethod/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/sessionManagement/view/getSessionManagementMethod/` - -Gets the name of the session management method for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## sessionManagementActionSetSessionManagementMethod - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/sessionManagement/action/setSessionManagementMethod/?contextId=0&methodName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/sessionManagement/action/setSessionManagementMethod/?contextId=0&methodName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/sessionManagement/action/setSessionManagementMethod/', params={ - 'contextId': '0', 'methodName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/sessionManagement/action/setSessionManagementMethod/', - params: { - 'contextId' => 'integer', -'methodName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/sessionManagement/action/setSessionManagementMethod/` - -Sets the session management method for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|methodName|query|string|true|none| -|methodConfigParams|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

users

- -## usersViewUsersList - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/view/usersList/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/view/usersList/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/view/usersList/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/view/usersList/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/view/usersList/` - -Gets a list of users that belong to the context with the given ID, or all users if none provided. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersViewGetUserById - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/view/getUserById/?contextId=0&userId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/view/getUserById/?contextId=0&userId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/view/getUserById/', params={ - 'contextId': '0', 'userId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/view/getUserById/', - params: { - 'contextId' => 'integer', -'userId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/view/getUserById/` - -Gets the data of the user with the given ID that belongs to the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersViewGetAuthenticationCredentialsConfigParams - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/view/getAuthenticationCredentialsConfigParams/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/view/getAuthenticationCredentialsConfigParams/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/view/getAuthenticationCredentialsConfigParams/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/view/getAuthenticationCredentialsConfigParams/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/view/getAuthenticationCredentialsConfigParams/` - -Gets the configuration parameters for the credentials of the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersViewGetAuthenticationCredentials - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/view/getAuthenticationCredentials/?contextId=0&userId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/view/getAuthenticationCredentials/?contextId=0&userId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/view/getAuthenticationCredentials/', params={ - 'contextId': '0', 'userId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/view/getAuthenticationCredentials/', - params: { - 'contextId' => 'integer', -'userId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/view/getAuthenticationCredentials/` - -Gets the authentication credentials of the user with given ID that belongs to the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersActionNewUser - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/action/newUser/?contextId=0&name=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/action/newUser/?contextId=0&name=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/action/newUser/', params={ - 'contextId': '0', 'name': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/action/newUser/', - params: { - 'contextId' => 'integer', -'name' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/action/newUser/` - -Creates a new user with the given name for the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|name|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersActionRemoveUser - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/action/removeUser/?contextId=0&userId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/action/removeUser/?contextId=0&userId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/action/removeUser/', params={ - 'contextId': '0', 'userId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/action/removeUser/', - params: { - 'contextId' => 'integer', -'userId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/action/removeUser/` - -Removes the user with the given ID that belongs to the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersActionSetUserEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/action/setUserEnabled/?contextId=0&userId=0&enabled=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/action/setUserEnabled/?contextId=0&userId=0&enabled=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/action/setUserEnabled/', params={ - 'contextId': '0', 'userId': '0', 'enabled': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/action/setUserEnabled/', - params: { - 'contextId' => 'integer', -'userId' => 'integer', -'enabled' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/action/setUserEnabled/` - -Sets whether or not the user, with the given ID that belongs to the context with the given ID, should be enabled. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| -|enabled|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersActionSetUserName - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/action/setUserName/?contextId=0&userId=0&name=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/action/setUserName/?contextId=0&userId=0&name=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/action/setUserName/', params={ - 'contextId': '0', 'userId': '0', 'name': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/action/setUserName/', - params: { - 'contextId' => 'integer', -'userId' => 'integer', -'name' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/action/setUserName/` - -Renames the user with the given ID that belongs to the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| -|name|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## usersActionSetAuthenticationCredentials - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/users/action/setAuthenticationCredentials/?contextId=0&userId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/users/action/setAuthenticationCredentials/?contextId=0&userId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/users/action/setAuthenticationCredentials/', params={ - 'contextId': '0', 'userId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/users/action/setAuthenticationCredentials/', - params: { - 'contextId' => 'integer', -'userId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/users/action/setAuthenticationCredentials/` - -Sets the authentication credentials for the user with the given ID that belongs to the context with the given ID. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| -|authCredentialsConfigParams|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

forcedUser

- -## forcedUserViewIsForcedUserModeEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/forcedUser/view/isForcedUserModeEnabled/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/forcedUser/view/isForcedUserModeEnabled/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/forcedUser/view/isForcedUserModeEnabled/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/forcedUser/view/isForcedUserModeEnabled/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/forcedUser/view/isForcedUserModeEnabled/` - -Returns 'true' if 'forced user' mode is enabled, 'false' otherwise - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## forcedUserViewGetForcedUser - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/forcedUser/view/getForcedUser/?contextId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/forcedUser/view/getForcedUser/?contextId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/forcedUser/view/getForcedUser/', params={ - 'contextId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/forcedUser/view/getForcedUser/', - params: { - 'contextId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/forcedUser/view/getForcedUser/` - -Gets the user (ID) set as 'forced user' for the given context (ID) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## forcedUserActionSetForcedUser - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/forcedUser/action/setForcedUser/?contextId=0&userId=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/forcedUser/action/setForcedUser/?contextId=0&userId=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/forcedUser/action/setForcedUser/', params={ - 'contextId': '0', 'userId': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/forcedUser/action/setForcedUser/', - params: { - 'contextId' => 'integer', -'userId' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/forcedUser/action/setForcedUser/` - -Sets the user (ID) that should be used in 'forced user' mode for the given context (ID) - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|contextId|query|integer|true|none| -|userId|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## forcedUserActionSetForcedUserModeEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/forcedUser/action/setForcedUserModeEnabled/?boolean=true \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/forcedUser/action/setForcedUserModeEnabled/?boolean=true"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/forcedUser/action/setForcedUserModeEnabled/', params={ - 'boolean': 'true' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/forcedUser/action/setForcedUserModeEnabled/', - params: { - 'boolean' => 'boolean' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/forcedUser/action/setForcedUserModeEnabled/` - -Sets if 'forced user' mode should be enabled or not - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|boolean|query|boolean|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

script

- -## scriptViewListEngines - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/listEngines/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/listEngines/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/listEngines/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/listEngines/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/listEngines/` - -Lists the script engines available - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptViewListTypes - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/listTypes/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/listTypes/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/listTypes/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/listTypes/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/listTypes/` - -Lists the script types available. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptViewListScripts - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/listScripts/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/listScripts/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/listScripts/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/listScripts/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/listScripts/` - -Lists the scripts available, with its engine, name, description, type and error state. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptViewGlobalVar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/globalVar/?varKey=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/globalVar/?varKey=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/globalVar/', params={ - 'varKey': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/globalVar/', - params: { - 'varKey' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/globalVar/` - -Gets the value of the global variable with the given key. Returns an API error (DOES_NOT_EXIST) if no value was previously set. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|varKey|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptViewGlobalVars - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/globalVars/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/globalVars/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/globalVars/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/globalVars/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/globalVars/` - -Gets all the global variables (key/value pairs). - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptViewScriptVar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/scriptVar/?scriptName=string&varKey=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/scriptVar/?scriptName=string&varKey=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/scriptVar/', params={ - 'scriptName': 'string', 'varKey': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/scriptVar/', - params: { - 'scriptName' => 'string', -'varKey' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/scriptVar/` - -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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| -|varKey|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptViewScriptVars - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/view/scriptVars/?scriptName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/view/scriptVars/?scriptName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/view/scriptVars/', params={ - 'scriptName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/view/scriptVars/', - params: { - 'scriptName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/view/scriptVars/` - -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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionEnable - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/enable/?scriptName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/enable/?scriptName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/enable/', params={ - 'scriptName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/enable/', - params: { - 'scriptName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/enable/` - -Enables the script with the given name - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionDisable - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/disable/?scriptName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/disable/?scriptName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/disable/', params={ - 'scriptName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/disable/', - params: { - 'scriptName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/disable/` - -Disables the script with the given name - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionLoad - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/load/?scriptName=string&scriptType=string&scriptEngine=string&fileName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/load/?scriptName=string&scriptType=string&scriptEngine=string&fileName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/load/', params={ - 'scriptName': 'string', 'scriptType': 'string', 'scriptEngine': 'string', 'fileName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/load/', - params: { - 'scriptName' => 'string', -'scriptType' => 'string', -'scriptEngine' => 'string', -'fileName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/load/` - -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). - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| -|scriptType|query|string|true|none| -|scriptEngine|query|string|true|none| -|fileName|query|string|true|none| -|scriptDescription|query|string|false|none| -|charset|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionRemove - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/remove/?scriptName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/remove/?scriptName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/remove/', params={ - 'scriptName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/remove/', - params: { - 'scriptName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/remove/` - -Removes the script with the given name - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionRunStandAloneScript - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/runStandAloneScript/?scriptName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/runStandAloneScript/?scriptName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/runStandAloneScript/', params={ - 'scriptName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/runStandAloneScript/', - params: { - 'scriptName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/runStandAloneScript/` - -Runs the stand alone script with the given name - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionClearGlobalVar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/clearGlobalVar/?varKey=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/clearGlobalVar/?varKey=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/clearGlobalVar/', params={ - 'varKey': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/clearGlobalVar/', - params: { - 'varKey' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/clearGlobalVar/` - -Clears the global variable with the given key. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|varKey|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionClearGlobalVars - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/clearGlobalVars/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/clearGlobalVars/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/clearGlobalVars/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/clearGlobalVars/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/clearGlobalVars/` - -Clears the global variables. - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionClearScriptVar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/clearScriptVar/?scriptName=string&varKey=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/clearScriptVar/?scriptName=string&varKey=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/clearScriptVar/', params={ - 'scriptName': 'string', 'varKey': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/clearScriptVar/', - params: { - 'scriptName' => 'string', -'varKey' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/clearScriptVar/` - -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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| -|varKey|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionClearScriptVars - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/clearScriptVars/?scriptName=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/clearScriptVars/?scriptName=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/clearScriptVars/', params={ - 'scriptName': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/clearScriptVars/', - params: { - 'scriptName' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/clearScriptVars/` - -Clears the variables of the given script. Returns an API error (DOES_NOT_EXIST) if no script with the given name exists. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionSetScriptVar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/setScriptVar/?scriptName=string&varKey=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/setScriptVar/?scriptName=string&varKey=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/setScriptVar/', params={ - 'scriptName': 'string', 'varKey': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/setScriptVar/', - params: { - 'scriptName' => 'string', -'varKey' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/setScriptVar/` - -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. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|scriptName|query|string|true|none| -|varKey|query|string|true|none| -|varValue|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## scriptActionSetGlobalVar - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/script/action/setGlobalVar/?varKey=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/script/action/setGlobalVar/?varKey=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/script/action/setGlobalVar/', params={ - 'varKey': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/script/action/setGlobalVar/', - params: { - 'varKey' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/script/action/setGlobalVar/` - -Sets the value of the global variable with the given key. - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|varKey|query|string|true|none| -|varValue|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -

stats

- -## statsViewStats - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/stats/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/stats/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/stats/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/stats/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/stats/` - -Statistics - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|keyPrefix|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewAllSitesStats - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/allSitesStats/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/allSitesStats/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/allSitesStats/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/allSitesStats/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/allSitesStats/` - -Gets all of the site based statistics, optionally filtered by a key prefix - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|keyPrefix|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewSiteStats - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/siteStats/?site=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/siteStats/?site=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/siteStats/', params={ - 'site': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/siteStats/', - params: { - 'site' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/siteStats/` - -Gets all of the global statistics, optionally filtered by a key prefix - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|site|query|string|true|none| -|keyPrefix|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewOptionStatsdHost - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/optionStatsdHost/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/optionStatsdHost/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/optionStatsdHost/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/optionStatsdHost/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/optionStatsdHost/` - -Gets the Statsd service hostname - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewOptionStatsdPort - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/optionStatsdPort/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/optionStatsdPort/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/optionStatsdPort/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/optionStatsdPort/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/optionStatsdPort/` - -Gets the Statsd service port - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewOptionStatsdPrefix - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/optionStatsdPrefix/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/optionStatsdPrefix/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/optionStatsdPrefix/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/optionStatsdPrefix/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/optionStatsdPrefix/` - -Gets the prefix to be applied to all stats sent to the configured Statsd service - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewOptionInMemoryEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/optionInMemoryEnabled/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/optionInMemoryEnabled/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/optionInMemoryEnabled/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/optionInMemoryEnabled/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/optionInMemoryEnabled/` - -Returns 'true' if in memory statistics are enabled, otherwise returns 'false' - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsViewOptionStatsdEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/view/optionStatsdEnabled/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/view/optionStatsdEnabled/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/view/optionStatsdEnabled/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/view/optionStatsdEnabled/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/view/optionStatsdEnabled/` - -Returns 'true' if a Statsd server has been correctly configured, otherwise returns 'false' - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsActionClearStats - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/action/clearStats/ \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/action/clearStats/"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/action/clearStats/', params={ - -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/action/clearStats/', - params: { - }, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/action/clearStats/` - -Clears all of the statistics - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|keyPrefix|query|string|false|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsActionSetOptionStatsdHost - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/action/setOptionStatsdHost/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/action/setOptionStatsdHost/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/action/setOptionStatsdHost/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/action/setOptionStatsdHost/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/action/setOptionStatsdHost/` - -Sets the Statsd service hostname, supply an empty string to stop using a Statsd service - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsActionSetOptionStatsdPrefix - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/action/setOptionStatsdPrefix/?String=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/action/setOptionStatsdPrefix/?String=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/action/setOptionStatsdPrefix/', params={ - 'String': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/action/setOptionStatsdPrefix/', - params: { - 'String' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/action/setOptionStatsdPrefix/` - -Sets the prefix to be applied to all stats sent to the configured Statsd service - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|String|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsActionSetOptionInMemoryEnabled - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/action/setOptionInMemoryEnabled/?Boolean=string \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/action/setOptionInMemoryEnabled/?Boolean=string"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/action/setOptionInMemoryEnabled/', params={ - 'Boolean': 'string' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/action/setOptionInMemoryEnabled/', - params: { - 'Boolean' => 'string' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/action/setOptionInMemoryEnabled/` - -Sets whether in memory statistics are enabled - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Boolean|query|string|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -## statsActionSetOptionStatsdPort - - - -> Code samples - -```shell -# You can also use wget -curl -X GET http://zap/JSON/stats/action/setOptionStatsdPort/?Integer=0 \ - -H 'Accept: application/json' \ - -H 'X-ZAP-API-Key: API_KEY' - -``` - -```java -URL obj = new URL("http://zap/JSON/stats/action/setOptionStatsdPort/?Integer=0"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); - -``` - -```python -import requests -headers = { - 'Accept': 'application/json', - 'X-ZAP-API-Key': 'API_KEY' -} - -r = requests.get('http://zap/JSON/stats/action/setOptionStatsdPort/', params={ - 'Integer': '0' -}, headers = headers) - -print r.json() - -``` - -```ruby -require 'rest-client' -require 'json' - -headers = { - 'Accept' => 'application/json', - 'X-ZAP-API-Key' => 'API_KEY' -} - -result = RestClient.get 'http://zap/JSON/stats/action/setOptionStatsdPort/', - params: { - 'Integer' => 'integer' -}, headers: headers - -p JSON.parse(result) - -``` - -`GET /JSON/stats/action/setOptionStatsdPort/` - -Sets the Statsd service port - -

Parameters

- -|Name|In|Type|Required|Description| -|---|---|---|---|---| -|Integer|query|integer|true|none| - -> Example responses - -> default Response - -```json -{ - "message": "string", - "code": 100 -} -``` - -

Responses

- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|default|Default|unexpected error|[Error](#schemaerror)| - - - -# Schemas - -

Error

- - - -```json -{ - "message": "string", - "code": 100 -} - -``` - -### Properties - -|Name|Type|Required|Restrictions|Description| -|---|---|---|---|---| -|message|string|true|none|none| -|code|integer|true|none|none| diff --git a/widdershins/templates/main.dot b/widdershins/templates/main.dot new file mode 100644 index 0000000..2c5a0c7 --- /dev/null +++ b/widdershins/templates/main.dot @@ -0,0 +1,139 @@ +{{= data.tags.section }} +# API Catalogue + +> Scroll down for {{? data.header.language_tabs.length}}code samples, {{?}}example requests and responses.{{? data.header.language_tabs.length}} Select a language for code samples from the tabs above or the mobile navigation menu.{{?}} + +{{? data.api.info && data.api.info.description}}{{=data.api.info.description}}{{?}} + +{{? data.api.servers }} +Base URLs: +{{~data.api.servers :s}} +* {{=s.url}} +{{ for(var v in s.variables) { }} + * **{{=v}}** - {{=s.variables[v].description||''}} Default: {{=s.variables[v].default}} +{{? s.variables[v].enum}} +{{~ s.variables[v].enum :e}} + * {{= e}} +{{~}} +{{?}} +{{ } }} +{{~}} +{{?}} + +{{? data.api.info && data.api.info.termsOfService}}Terms of service{{?}} +{{? data.api.info && data.api.info.contact}}{{? data.api.info.contact.email}}Email: {{=data.api.info.contact.name || 'Support'}} {{?}}{{? data.api.info.contact.url}}Web: {{= data.api.info.contact.name || 'Support'}} {{?}}{{?}} +{{? data.api.info && data.api.info.license}}{{? data.api.info.license.url}}License: {{=data.api.info.license.name}}{{??}} License: {{=data.api.info.license.name}}{{?}}{{?}} +{{= data.tags.endSection }} + +{{? data.api.components && data.api.components.securitySchemes }} +{{#def.security}} +{{?}} + +{{ for (var r in data.resources) { }} +{{ data.resource = data.resources[r]; }} + +{{= data.tags.section }} +

{{= r}}

+ +{{? data.resource.description }}{{= data.resource.description}}{{?}} + +{{? data.resource.externalDocs}} +{{=data.resource.externalDocs.description||'External documentation'}} +{{?}} + +{{ for (var m in data.resource.methods) { }} +{{ data.operationUniqueName = m; }} +{{ data.method = data.resource.methods[m]; }} +{{ data.operationUniqueSlug = data.method.slug; }} +{{ data.operation = data.method.operation; }} +{{= data.templates.operation(data) }} +{{ } /* of methods */ }} + +{{= data.tags.endSection }} +{{ } /* of resources */ }} + +{{? data.api.components && data.api.components.schemas }} +{{= data.tags.section }} + +# Schemas + +{{ for (var s in data.components.schemas) { }} +{{ var origSchema = data.components.schemas[s]; }} +{{ var schema = data.api.components.schemas[s]; }} + +{{= data.tags.section }} +

{{=s}}

+{{ /* backwards compatibility */ }} + + + + + +{{? data.options.yaml }} +```yaml +{{=data.utils.yaml.stringify(data.utils.getSample(schema,data.options,{quiet:true},data.api))}} +{{??}} +```json +{{=data.utils.safejson(data.utils.getSample(schema,data.options,{quiet:true},data.api),null,2)}} +{{?}} +``` + +{{ var enums = []; }} +{{ var blocks = data.utils.schemaToArray(origSchema,-1,{trim:true,join:true},data); }} +{{ for (var block of blocks) { + for (var p of block.rows) { + if (p.schema && p.schema.enum) { + for (var e of p.schema.enum) { + enums.push({name:p.name,value:e}); + } + } + } + } +}} + +{{~ blocks :block}} +{{? block.title }}{{= block.title}}{{= '\n\n'}}{{?}} +{{? block.externalDocs}} +{{=block.externalDocs.description||'External documentation'}} +{{?}} + +{{? block===blocks[0] }} +{{= data.tags.section }} + +### Properties +{{?}} + +{{? block.rows.length}}|Name|Type|Required|Restrictions|Description| +|---|---|---|---|---|{{?}} +{{~ block.rows :p}}|{{=p.displayName}}|{{=p.safeType}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}| +{{~}} +{{~}} +{{? (blocks[0].rows.length === 0) && (blocks.length === 1) }} +*None* +{{?}} + +{{? enums.length > 0 }} +{{= data.tags.section }} + +#### Enumerated Values + +|Property|Value| +|---|---| +{{~ enums :e}}|{{=e.name}}|{{=data.utils.toPrimitive(e.value)}}| +{{~}} + +{{= data.tags.endSection }} +{{?}} + +{{= data.tags.endSection }} +{{= data.tags.endSection }} + +{{ } /* of schemas */ }} + +{{?}} + +{{#def.footer}} + +{{? data.options.discovery}} +{{#def.discovery}} +{{?}}