curl --request GET \
--url https://api.duvo.ai/v2/automations/{automation_id}/policy \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/policy', 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.duvo.ai/v2/automations/{automation_id}/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.duvo.ai/v2/automations/{automation_id}/policy"
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))
}HttpResponse<String> response = Unirest.get("https://api.duvo.ai/v2/automations/{automation_id}/policy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"policy": {
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"running": true,
"sections": [
{
"key": "<string>",
"section": "<string>",
"fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"label": "<string>",
"question": "<string>",
"type": "freeText",
"origin": "template",
"customized": true,
"bindings": [
"context"
],
"required": true,
"fill_mode": "interview",
"status": "answered",
"value": "<string>",
"provenance": {
"filled_via": "manual",
"filled_by_name": "<string>",
"filled_at": "<string>"
},
"options": [
"<unknown>"
],
"columns": [
"<unknown>"
]
}
]
}
],
"counts": {
"questions": {
"answered": 0,
"open": 0,
"total": 0,
"required_open": 0
},
"module_defaults": {
"filled": 0,
"open": 0,
"total": 0
}
},
"pending_proposals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_key": "<string>",
"question": "<string>",
"proposed_value": "<string>",
"rationale": "<string>",
"confidence": "<unknown>",
"interview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interviewee": "<string>"
}
],
"context_notes": {
"accepted": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"note": "<string>",
"rationale": "<string>",
"source": "<string>",
"interviewee": "<string>"
}
],
"pending": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"note": "<string>",
"rationale": "<string>",
"source": "<string>",
"interviewee": "<string>"
}
]
},
"interviews": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_email": "<string>",
"status": "<string>",
"context": "<string>",
"created_at": "<string>",
"answers_written": 0
}
],
"pending_apply": {
"count": 0,
"fields": [
{
"key": "<string>",
"question": "<string>",
"value": "<string>"
}
],
"notes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
},
"links": {
"dashboards": [
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"link": "<string>"
}
],
"overview": "<string>",
"process": "<string>",
"past_runs": "<string>",
"requests": "<string>",
"policy": "<string>",
"people": "<string>",
"agents_queues": "<string>",
"revisions": "<string>",
"setup": "<string>",
"setup_start": "<string>",
"upload_files": "<string>",
"interview": "<string>",
"automation_proposal": "<string>"
},
"urls": {
"dashboards": [
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"link": "<string>"
}
],
"overview": "<string>",
"process": "<string>",
"past_runs": "<string>",
"requests": "<string>",
"policy": "<string>",
"people": "<string>",
"agents_queues": "<string>",
"revisions": "<string>",
"setup": "<string>",
"setup_start": "<string>",
"upload_files": "<string>",
"interview": "<string>",
"automation_proposal": "<string>"
},
"hidden_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"label": "<string>",
"question": "<string>",
"section": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Read Automation Policy
Read an automation’s whole Policy before answering anything about it: every question by section, with its id (the field id updateConfigField takes), key, type, answer and who gave it; counts.questions as the Policy screen’s header counts them (required_open is what still blocks a run) apart from the module’s pre-filled module_defaults; answers proposed by interviews and waiting for review; accepted and pending process-context notes; the interviews assigned; and pending_apply, the structural answers and notes not yet written into an Agent. running says whether the automation runs on live work: there a changed answer reaches its Agents from their next run, so name the question, its current answer and the new one, and change it only after the user says yes. A question whose bindings include structural changes how the Agents run; propose the matching Agent change too. Never invent an answer for a question shown as open. Give the user the full URLs in urls.
curl --request GET \
--url https://api.duvo.ai/v2/automations/{automation_id}/policy \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/policy', 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.duvo.ai/v2/automations/{automation_id}/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.duvo.ai/v2/automations/{automation_id}/policy"
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))
}HttpResponse<String> response = Unirest.get("https://api.duvo.ai/v2/automations/{automation_id}/policy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"policy": {
"automation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"running": true,
"sections": [
{
"key": "<string>",
"section": "<string>",
"fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"label": "<string>",
"question": "<string>",
"type": "freeText",
"origin": "template",
"customized": true,
"bindings": [
"context"
],
"required": true,
"fill_mode": "interview",
"status": "answered",
"value": "<string>",
"provenance": {
"filled_via": "manual",
"filled_by_name": "<string>",
"filled_at": "<string>"
},
"options": [
"<unknown>"
],
"columns": [
"<unknown>"
]
}
]
}
],
"counts": {
"questions": {
"answered": 0,
"open": 0,
"total": 0,
"required_open": 0
},
"module_defaults": {
"filled": 0,
"open": 0,
"total": 0
}
},
"pending_proposals": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"field_key": "<string>",
"question": "<string>",
"proposed_value": "<string>",
"rationale": "<string>",
"confidence": "<unknown>",
"interview_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"interviewee": "<string>"
}
],
"context_notes": {
"accepted": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"note": "<string>",
"rationale": "<string>",
"source": "<string>",
"interviewee": "<string>"
}
],
"pending": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"note": "<string>",
"rationale": "<string>",
"source": "<string>",
"interviewee": "<string>"
}
]
},
"interviews": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_email": "<string>",
"status": "<string>",
"context": "<string>",
"created_at": "<string>",
"answers_written": 0
}
],
"pending_apply": {
"count": 0,
"fields": [
{
"key": "<string>",
"question": "<string>",
"value": "<string>"
}
],
"notes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
},
"links": {
"dashboards": [
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"link": "<string>"
}
],
"overview": "<string>",
"process": "<string>",
"past_runs": "<string>",
"requests": "<string>",
"policy": "<string>",
"people": "<string>",
"agents_queues": "<string>",
"revisions": "<string>",
"setup": "<string>",
"setup_start": "<string>",
"upload_files": "<string>",
"interview": "<string>",
"automation_proposal": "<string>"
},
"urls": {
"dashboards": [
{
"artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"link": "<string>"
}
],
"overview": "<string>",
"process": "<string>",
"past_runs": "<string>",
"requests": "<string>",
"policy": "<string>",
"people": "<string>",
"agents_queues": "<string>",
"revisions": "<string>",
"setup": "<string>",
"setup_start": "<string>",
"upload_files": "<string>",
"interview": "<string>",
"automation_proposal": "<string>"
},
"hidden_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"label": "<string>",
"question": "<string>",
"section": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
Automation ID
Query Parameters
Also list the questions a person hid, under hidden_fields. Defaults to false.
true, false Response
Default Response
The automation's whole Policy
Show child attributes
Show child attributes
Was this page helpful?