List dynamic scan targets
curl --request GET \
--url https://app.trustivan.com/api/v1/dast/targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/dast/targets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/dast/targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/dast/targets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"targets": [
{
"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"
}
],
"engine": {
"available": true,
"detail": "<string>"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}List dynamic scan targets
The organization’s web applications, with what a customer publishes to
prove ownership of each. engine.available says whether a dynamic
scan can start right now; while it is false, adding a target, starting
a scan and enabling a schedule on a target answer 503, and scans do
not wait for the engine to come back.
Requires assets:read.
GET
/
dast
/
targets
List dynamic scan targets
curl --request GET \
--url https://app.trustivan.com/api/v1/dast/targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/dast/targets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/dast/targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/dast/targets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"targets": [
{
"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"
}
],
"engine": {
"available": true,
"detail": "<string>"
}
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}