Create Pulse Dashboard Attachment Upload URL
curl --request POST \
--url https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls \
--header 'Content-Type: application/json' \
--data '
{
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 13107200
}
'import requests
url = "https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls"
payload = {
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 13107200
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>', mime_type: '<string>', size_bytes: 13107200})
};
fetch('https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls', 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/artifacts/{artifactId}/attachments/upload-urls",
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([
'filename' => '<string>',
'mime_type' => '<string>',
'size_bytes' => 13107200
]),
CURLOPT_HTTPHEADER => [
"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.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls"
payload := strings.NewReader("{\n \"filename\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 13107200\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 13107200\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 13107200\n}"
response = http.request(request)
puts response.read_body{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sandbox_id": "<string>",
"sandbox_path": "<string>",
"upload_url": "<string>",
"expires_in_seconds": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Duvo Pulse
Create Pulse Dashboard Attachment Upload URL
Issue a presigned upload URL for a file to attach to a Duvo Pulse dashboard message (e.g. an HTML dashboard to copy, or a screenshot to match). POST the file bytes to the returned upload_url as multipart form data under the field name ‘file’, then pass the returned attachment_id in the attachments array of POST /artifacts//messages. The agent reads the file directly from its sandbox. Files live as long as the dashboard’s sandbox (about 12 hours), so upload shortly before sending.
POST
/
v2
/
artifacts
/
{artifactId}
/
attachments
/
upload-urls
Create Pulse Dashboard Attachment Upload URL
curl --request POST \
--url https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls \
--header 'Content-Type: application/json' \
--data '
{
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 13107200
}
'import requests
url = "https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls"
payload = {
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 13107200
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>', mime_type: '<string>', size_bytes: 13107200})
};
fetch('https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls', 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/artifacts/{artifactId}/attachments/upload-urls",
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([
'filename' => '<string>',
'mime_type' => '<string>',
'size_bytes' => 13107200
]),
CURLOPT_HTTPHEADER => [
"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.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls"
payload := strings.NewReader("{\n \"filename\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 13107200\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 13107200\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/artifacts/{artifactId}/attachments/upload-urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"size_bytes\": 13107200\n}"
response = http.request(request)
puts response.read_body{
"attachment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sandbox_id": "<string>",
"sandbox_path": "<string>",
"upload_url": "<string>",
"expires_in_seconds": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Response
Default Response
Was this page helpful?