Audits
Create a custom evidence request for an audit
Create a custom evidence request for an audit.
Rate limit: 10 requests / minute.
POST
/
audits
/
{auditId}
/
evidence
/
custom-evidence-requests
TypeScript
import { Vanta } from "vanta-auditor-api-sdk";
const vanta = new Vanta({
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await vanta.audits.createCustomEvidenceRequest({
auditId: "<id>",
createCustomEvidenceRequestInput: {
controlIds: [
"<value 1>",
"<value 2>",
],
title: "<value>",
description: "pure bludgeon deliberately question although",
cadence: "P1D",
reminderWindow: "P0D",
isRestricted: false,
auditorEmail: "<value>",
},
});
console.log(result);
}
run();package hello.world;
import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.components.CreateCustomEvidenceRequestInput;
import com.vanta.vanta_auditor_api.models.components.RecurrenceDuration;
import com.vanta.vanta_auditor_api.models.operations.CreateCustomEvidenceRequestResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws Exception {
Vanta sdk = Vanta.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
CreateCustomEvidenceRequestResponse res = sdk.audits().createCustomEvidenceRequest()
.auditId("<id>")
.createCustomEvidenceRequestInput(CreateCustomEvidenceRequestInput.builder()
.controlIds(List.of(
"<value 1>",
"<value 2>"))
.title("<value>")
.description("pure bludgeon deliberately question although")
.cadence(RecurrenceDuration.P1_D)
.reminderWindow(RecurrenceDuration.P0_D)
.isRestricted(false)
.auditorEmail("<value>")
.build())
.call();
if (res.customEvidenceRequest().isPresent()) {
System.out.println(res.customEvidenceRequest().get());
}
}
}curl --request POST \
--url https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"controlIds": [
"<string>"
],
"title": "<string>",
"description": "<string>",
"isRestricted": true,
"auditorEmail": "<string>"
}
'import requests
url = "https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests"
payload = {
"controlIds": ["<string>"],
"title": "<string>",
"description": "<string>",
"isRestricted": True,
"auditorEmail": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
controlIds: ['<string>'],
title: '<string>',
description: '<string>',
isRestricted: true,
auditorEmail: '<string>'
})
};
fetch('https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests', 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://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'controlIds' => [
'<string>'
],
'title' => '<string>',
'description' => '<string>',
'isRestricted' => true,
'auditorEmail' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests"
payload := strings.NewReader("{\n \"controlIds\": [\n \"<string>\"\n ],\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"isRestricted\": true,\n \"auditorEmail\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"controlIds\": [\n \"<string>\"\n ],\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"isRestricted\": true,\n \"auditorEmail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "65fc81a3359c8508c9af880f",
"controlIds": [
"1.1.2.a"
],
"title": "Access Control Policy",
"description": "Description for Access Control Policy",
"cadence": "P6M",
"reminderWindow": "P6M",
"isRestricted": true
}Authorizations
Body
application/json
Response
200 - application/json
Ok
Was this page helpful?
⌘I
TypeScript
import { Vanta } from "vanta-auditor-api-sdk";
const vanta = new Vanta({
bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await vanta.audits.createCustomEvidenceRequest({
auditId: "<id>",
createCustomEvidenceRequestInput: {
controlIds: [
"<value 1>",
"<value 2>",
],
title: "<value>",
description: "pure bludgeon deliberately question although",
cadence: "P1D",
reminderWindow: "P0D",
isRestricted: false,
auditorEmail: "<value>",
},
});
console.log(result);
}
run();package hello.world;
import com.vanta.vanta_auditor_api.Vanta;
import com.vanta.vanta_auditor_api.models.components.CreateCustomEvidenceRequestInput;
import com.vanta.vanta_auditor_api.models.components.RecurrenceDuration;
import com.vanta.vanta_auditor_api.models.operations.CreateCustomEvidenceRequestResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws Exception {
Vanta sdk = Vanta.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
CreateCustomEvidenceRequestResponse res = sdk.audits().createCustomEvidenceRequest()
.auditId("<id>")
.createCustomEvidenceRequestInput(CreateCustomEvidenceRequestInput.builder()
.controlIds(List.of(
"<value 1>",
"<value 2>"))
.title("<value>")
.description("pure bludgeon deliberately question although")
.cadence(RecurrenceDuration.P1_D)
.reminderWindow(RecurrenceDuration.P0_D)
.isRestricted(false)
.auditorEmail("<value>")
.build())
.call();
if (res.customEvidenceRequest().isPresent()) {
System.out.println(res.customEvidenceRequest().get());
}
}
}curl --request POST \
--url https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"controlIds": [
"<string>"
],
"title": "<string>",
"description": "<string>",
"isRestricted": true,
"auditorEmail": "<string>"
}
'import requests
url = "https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests"
payload = {
"controlIds": ["<string>"],
"title": "<string>",
"description": "<string>",
"isRestricted": True,
"auditorEmail": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
controlIds: ['<string>'],
title: '<string>',
description: '<string>',
isRestricted: true,
auditorEmail: '<string>'
})
};
fetch('https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests', 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://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'controlIds' => [
'<string>'
],
'title' => '<string>',
'description' => '<string>',
'isRestricted' => true,
'auditorEmail' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests"
payload := strings.NewReader("{\n \"controlIds\": [\n \"<string>\"\n ],\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"isRestricted\": true,\n \"auditorEmail\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}require 'uri'
require 'net/http'
url = URI("https://api.vanta.com/v1/audits/{auditId}/evidence/custom-evidence-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"controlIds\": [\n \"<string>\"\n ],\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"isRestricted\": true,\n \"auditorEmail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "65fc81a3359c8508c9af880f",
"controlIds": [
"1.1.2.a"
],
"title": "Access Control Policy",
"description": "Description for Access Control Policy",
"cadence": "P6M",
"reminderWindow": "P6M",
"isRestricted": true
}