curl --request PATCH \
--url https://app.trustivan.com/api/v1/dast/targets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests_per_second": 25,
"max_duration_minutes": 32,
"auth_header_name": "Authorization",
"auth_header_value": "<string>",
"clear_auth": true,
"openapi_document": "<string>",
"graphql_endpoint": "/graphql",
"graphql_schema": "<string>",
"wsdl_path": "/ws?wsdl",
"wsdl_document": "<string>",
"grpc_address": "api.example.com:443"
}
'import requests
url = "https://app.trustivan.com/api/v1/dast/targets/{id}"
payload = {
"requests_per_second": 25,
"max_duration_minutes": 32,
"auth_header_name": "Authorization",
"auth_header_value": "<string>",
"clear_auth": True,
"openapi_document": "<string>",
"graphql_endpoint": "/graphql",
"graphql_schema": "<string>",
"wsdl_path": "/ws?wsdl",
"wsdl_document": "<string>",
"grpc_address": "api.example.com:443"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requests_per_second: 25,
max_duration_minutes: 32,
auth_header_name: 'Authorization',
auth_header_value: '<string>',
clear_auth: true,
openapi_document: '<string>',
graphql_endpoint: '/graphql',
graphql_schema: '<string>',
wsdl_path: '/ws?wsdl',
wsdl_document: '<string>',
grpc_address: 'api.example.com:443'
})
};
fetch('https://app.trustivan.com/api/v1/dast/targets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/dast/targets/{id}"
payload := strings.NewReader("{\n \"requests_per_second\": 25,\n \"max_duration_minutes\": 32,\n \"auth_header_name\": \"Authorization\",\n \"auth_header_value\": \"<string>\",\n \"clear_auth\": true,\n \"openapi_document\": \"<string>\",\n \"graphql_endpoint\": \"/graphql\",\n \"graphql_schema\": \"<string>\",\n \"wsdl_path\": \"/ws?wsdl\",\n \"wsdl_document\": \"<string>\",\n \"grpc_address\": \"api.example.com:443\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"target": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"host": "<string>",
"verified": true,
"mode": "active",
"has_auth": true,
"has_openapi": true,
"has_graphql_schema": true,
"has_wsdl_document": true,
"requests_per_second": 25,
"max_duration_minutes": 32,
"verification": {
"dns_record_name": "_trustivan-challenge.staging.example.com",
"dns_record_type": "TXT",
"dns_record_value": "trustivan-verify=0123456789abcdef0123456789abcdef",
"file_url": "https://staging.example.com/.well-known/trustivan-verification.txt",
"file_content": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"verification_method": "dns_txt",
"verified_at": "2023-11-07T05:31:56Z",
"last_checked_at": "2023-11-07T05:31:56Z",
"last_check_error": "<string>",
"first_scan_not_queued": "<string>",
"auth_header_name": "<string>",
"openapi_bytes": 123,
"graphql_endpoint": "/graphql",
"graphql_schema_bytes": 123,
"wsdl_path": "/ws?wsdl",
"wsdl_document_bytes": 123,
"grpc_address": "api.example.com:443",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Change a target's limits, credential or API spec
An absent field is left alone.
auth_header_name and auth_header_value are sent together and set
the one header added to every in-scope request of an active scan.
The value is encrypted at rest and is write-only: no response returns
it. clear_auth: true removes it.
openapi_document is an OpenAPI 2 or 3 description, as JSON or YAML,
at most 1 MB. It is accepted only for a verified target (409 with
code: dast_target_not_verified otherwise), and an empty string
removes it.
graphql_endpoint is the path of a GraphQL endpoint on the target’s
origin, such as /graphql, and graphql_schema its schema, as SDL or
a JSON introspection result, at most 1 MB. Both are accepted only for a
verified target, a schema only beside an endpoint, and an empty string
removes either.
wsdl_path is where the target serves its SOAP service description, a
path on its origin such as /ws?wsdl, and wsdl_document an uploaded
WSDL (at most 1 MB) used instead. grpc_address is host:port of the
target’s gRPC server; the host must be the target’s own. Each is
accepted only for a verified target, and an empty string removes it.
Requires assets:write.
curl --request PATCH \
--url https://app.trustivan.com/api/v1/dast/targets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests_per_second": 25,
"max_duration_minutes": 32,
"auth_header_name": "Authorization",
"auth_header_value": "<string>",
"clear_auth": true,
"openapi_document": "<string>",
"graphql_endpoint": "/graphql",
"graphql_schema": "<string>",
"wsdl_path": "/ws?wsdl",
"wsdl_document": "<string>",
"grpc_address": "api.example.com:443"
}
'import requests
url = "https://app.trustivan.com/api/v1/dast/targets/{id}"
payload = {
"requests_per_second": 25,
"max_duration_minutes": 32,
"auth_header_name": "Authorization",
"auth_header_value": "<string>",
"clear_auth": True,
"openapi_document": "<string>",
"graphql_endpoint": "/graphql",
"graphql_schema": "<string>",
"wsdl_path": "/ws?wsdl",
"wsdl_document": "<string>",
"grpc_address": "api.example.com:443"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requests_per_second: 25,
max_duration_minutes: 32,
auth_header_name: 'Authorization',
auth_header_value: '<string>',
clear_auth: true,
openapi_document: '<string>',
graphql_endpoint: '/graphql',
graphql_schema: '<string>',
wsdl_path: '/ws?wsdl',
wsdl_document: '<string>',
grpc_address: 'api.example.com:443'
})
};
fetch('https://app.trustivan.com/api/v1/dast/targets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/dast/targets/{id}"
payload := strings.NewReader("{\n \"requests_per_second\": 25,\n \"max_duration_minutes\": 32,\n \"auth_header_name\": \"Authorization\",\n \"auth_header_value\": \"<string>\",\n \"clear_auth\": true,\n \"openapi_document\": \"<string>\",\n \"graphql_endpoint\": \"/graphql\",\n \"graphql_schema\": \"<string>\",\n \"wsdl_path\": \"/ws?wsdl\",\n \"wsdl_document\": \"<string>\",\n \"grpc_address\": \"api.example.com:443\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"target": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"host": "<string>",
"verified": true,
"mode": "active",
"has_auth": true,
"has_openapi": true,
"has_graphql_schema": true,
"has_wsdl_document": true,
"requests_per_second": 25,
"max_duration_minutes": 32,
"verification": {
"dns_record_name": "_trustivan-challenge.staging.example.com",
"dns_record_type": "TXT",
"dns_record_value": "trustivan-verify=0123456789abcdef0123456789abcdef",
"file_url": "https://staging.example.com/.well-known/trustivan-verification.txt",
"file_content": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"verification_method": "dns_txt",
"verified_at": "2023-11-07T05:31:56Z",
"last_checked_at": "2023-11-07T05:31:56Z",
"last_check_error": "<string>",
"first_scan_not_queued": "<string>",
"auth_header_name": "<string>",
"openapi_bytes": 123,
"graphql_endpoint": "/graphql",
"graphql_schema_bytes": 123,
"wsdl_path": "/ws?wsdl",
"wsdl_document_bytes": 123,
"grpc_address": "api.example.com:443",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Body
Response
One dynamic scan target.