curl --request GET \
--url https://api.duvo.ai/v2/agents/{agent_id}/revisions/{build_id}/body \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/agents/{agent_id}/revisions/{build_id}/body"
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/agents/{agent_id}/revisions/{build_id}/body', 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/agents/{agent_id}/revisions/{build_id}/body",
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/agents/{agent_id}/revisions/{build_id}/body"
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/agents/{agent_id}/revisions/{build_id}/body")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/agents/{agent_id}/revisions/{build_id}/body")
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{
"section": "input",
"total_chars": 0,
"offset": 0,
"text": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Get Revision Body
Read one section of a revision’s config as plain text, in character ranges: the AOP (input) or the code-step program (source). Use it instead of getRevision when the text is large; listAgents with config=light reports each agent’s input_chars and source_chars.
curl --request GET \
--url https://api.duvo.ai/v2/agents/{agent_id}/revisions/{build_id}/body \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/agents/{agent_id}/revisions/{build_id}/body"
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/agents/{agent_id}/revisions/{build_id}/body', 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/agents/{agent_id}/revisions/{build_id}/body",
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/agents/{agent_id}/revisions/{build_id}/body"
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/agents/{agent_id}/revisions/{build_id}/body")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/agents/{agent_id}/revisions/{build_id}/body")
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{
"section": "input",
"total_chars": 0,
"offset": 0,
"text": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
The agent's unique identifier
The revision's unique identifier
Query Parameters
input is an agent step's AOP text; source is a code step's program.
input, source Character offset to start reading from (default 0)
0 <= x <= 9007199254740991Characters to return (1-50000, default 40000). Repeat with a higher offset until offset plus the returned length reaches total_chars.
1 <= x <= 50000Response
Default Response
input, source Length of the whole section
-9007199254740991 <= x <= 9007199254740991Where text starts within the section
-9007199254740991 <= x <= 9007199254740991The requested range of the section
Was this page helpful?