Get the detections for a relationship
curl --request GET \
--url https://app.visotrust.com/api/v1/relationships/{id}/detectionsimport requests
url = "https://app.visotrust.com/api/v1/relationships/{id}/detections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.visotrust.com/api/v1/relationships/{id}/detections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.visotrust.com/api/v1/relationships/{id}/detections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.visotrust.com/api/v1/relationships/{id}/detections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.visotrust.com/api/v1/relationships/{id}/detections")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.visotrust.com/api/v1/relationships/{id}/detections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"relationshipId": 123,
"assessmentId": 123,
"riskAssessmentId": 123,
"riskAssessmentDate": "2023-11-07T05:31:56Z",
"artifactsInProgress": [
{
"artifactId": 123,
"artifactName": "<string>"
}
],
"size": 123,
"afterId": 123,
"nextAfterId": 123,
"detections": [
{
"id": 123,
"detectionType": "NORMAL",
"detectionStatus": "UNVALIDATED",
"text": "<string>",
"controlIdsText": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"controlDomainId": 123,
"controlDomainName": "<string>",
"controlDomainType": "SECURITY",
"controlId": 123,
"controlName": "<string>",
"questionnaireAnswer": {
"answer": "<string>",
"aiAnswer": "<string>",
"answered": true,
"answerSource": "VISO_AI",
"answeredDate": "2023-11-07T05:31:56Z"
},
"source": {
"artifactId": 123,
"artifactName": "<string>",
"viewerPage": "<string>"
}
}
]
}Relationships
Get the detections for a relationship
Returns one page of the control validation detections (e.g. CUECs, exceptions, shared-responsibility-model statements) in this relationship’s evidence, one entry per detection, in id order. Read every page by passing each response’s nextAfterId as afterId until it is null; if riskAssessmentId changes between pages, the evidence changed, so start again. riskAssessmentId is null only before the relationship’s first risk assessment, which is not the same as having no detections. Detections on artifacts listed in artifactsInProgress are left out until their validation completes, so a detection missing from one of those artifacts has not been resolved.
GET
/
api
/
v1
/
relationships
/
{id}
/
detections
Get the detections for a relationship
curl --request GET \
--url https://app.visotrust.com/api/v1/relationships/{id}/detectionsimport requests
url = "https://app.visotrust.com/api/v1/relationships/{id}/detections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.visotrust.com/api/v1/relationships/{id}/detections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.visotrust.com/api/v1/relationships/{id}/detections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.visotrust.com/api/v1/relationships/{id}/detections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.visotrust.com/api/v1/relationships/{id}/detections")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.visotrust.com/api/v1/relationships/{id}/detections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"relationshipId": 123,
"assessmentId": 123,
"riskAssessmentId": 123,
"riskAssessmentDate": "2023-11-07T05:31:56Z",
"artifactsInProgress": [
{
"artifactId": 123,
"artifactName": "<string>"
}
],
"size": 123,
"afterId": 123,
"nextAfterId": 123,
"detections": [
{
"id": 123,
"detectionType": "NORMAL",
"detectionStatus": "UNVALIDATED",
"text": "<string>",
"controlIdsText": "<string>",
"updatedDate": "2023-11-07T05:31:56Z",
"controlDomainId": 123,
"controlDomainName": "<string>",
"controlDomainType": "SECURITY",
"controlId": 123,
"controlName": "<string>",
"questionnaireAnswer": {
"answer": "<string>",
"aiAnswer": "<string>",
"answered": true,
"answerSource": "VISO_AI",
"answeredDate": "2023-11-07T05:31:56Z"
},
"source": {
"artifactId": 123,
"artifactName": "<string>",
"viewerPage": "<string>"
}
}
]
}Query Parameters
Only detections in these kinds of control domain; repeatable. Defaults to all.
Available options:
SECURITY, PRIVACY, RESILIENCE, ARTIFICIAL_INTELLIGENCE, PRODUCT_SECURITY, GOVERNANCE_ETHICS, FOURTH_PARTY, SUSTAINABILITY_HUMAN_RIGHTS, SANCTIONS_TRADE, FINANCIAL_VIABILITY, CYBER_INSURANCE, SERVICE_LOCATIONS, SUBSERVICERS, SUPPLEMENTAL_QUESTIONNAIRE, UNASSIGNED Response
200 - application/json
OK