Change the access of a saved test
update_targetChange the access of a saved test (permission: edit)
Sets or removes the saved access of a protected website test (https url only; any other test is 400 field_not_applicable on access). access as an object replaces the saved access whole: basicAuth { username, password } and/or up to 3 headers (never Host, Cookie or Authorization), sent only to the origin of the test's url by every scan, journey recording and replay; a header left out is removed and basicAuth needs its password again. access: null removes it. Write-only: the values are never returned; the 200 is the Target with only access.basicAuth and access.headerNames. Starts no scan: the next scheduled scan or POST /targets/{id}/scans uses it. URL, country and type cannot change.
The values pass through you once and are never returned: get_target and the dashboard show only access.basicAuth and access.headerNames. To check the access, start a scan with rerun_target_scan; get_scan answers accessFailure when the site still refuses it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"access": "<access>"
},
"name": "update_target"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Saved test id: from GET /targets or the POST /targets answer. | |
| access | Yes | Access to a protected test environment (website test with an https url only; any other test is 400 field_not_applicable): basicAuth { username, password } and/or up to 3 headers, sent only to the origin of the test's url, never to third parties, by every scan, journey recording and replay of the test. Write-only: the values are stored and never returned; the Target and the dashboard show only whether a login is set and the header names. An object replaces the saved access whole (a header left out is removed; basicAuth needs its password again); null removes it. |