Check ownership now
curl --request POST \
--url https://app.trustivan.com/api/v1/dast/targets/{id}/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/dast/targets/{id}/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/dast/targets/{id}/verify', 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/{id}/verify"
req, _ := http.NewRequest("POST", 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))
}{
"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"
}Check ownership now
Looks for the target’s token in a DNS TXT record at
_trustivan-challenge.<host>, then in the file at
/.well-known/trustivan-verification.txt on the target’s origin.
Either is enough.
Answers 200 whether or not the check passed: read verified, and
last_check_error for why not. The file is not accepted through a
redirect to another host.
Verification is not permanent. It is checked again before every active scan, and a target whose token is gone becomes unverified.
Requires assets:write.
POST
/
dast
/
targets
/
{id}
/
verify
Check ownership now
curl --request POST \
--url https://app.trustivan.com/api/v1/dast/targets/{id}/verify \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/dast/targets/{id}/verify"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/dast/targets/{id}/verify', 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/{id}/verify"
req, _ := http.NewRequest("POST", 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))
}{
"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"
}Authorizations
Response
One dynamic scan target.