Duplicate published document
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Dashboard Copy",
"folderPath": "/reports/2024/q4",
"scope": "organization"
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate"
payload = {
"name": "My Dashboard Copy",
"folderPath": "/reports/2024/q4",
"scope": "organization"
}
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({
name: 'My Dashboard Copy',
folderPath: '/reports/2024/q4',
scope: 'organization'
})
};
fetch('https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate', 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://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate",
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([
'name' => 'My Dashboard Copy',
'folderPath' => '/reports/2024/q4',
'scope' => 'organization'
]),
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://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate"
payload := strings.NewReader("{\n \"name\": \"My Dashboard Copy\",\n \"folderPath\": \"/reports/2024/q4\",\n \"scope\": \"organization\"\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))
}HttpResponse<String> response = Unirest.post("https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Dashboard Copy\",\n \"folderPath\": \"/reports/2024/q4\",\n \"scope\": \"organization\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate")
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 \"name\": \"My Dashboard Copy\",\n \"folderPath\": \"/reports/2024/q4\",\n \"scope\": \"organization\"\n}"
response = http.request(request)
puts response.read_body{
"dashboardId": "abc123-dash-id",
"identifier": "xyz789-new-identifier",
"name": "My Dashboard Copy",
"workbookId": "def456-workbook-id"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Documents
Duplicate published document
POST
/
v1
/
documents
/
{documentId}
/
duplicate
Duplicate published document
curl --request POST \
--url https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Dashboard Copy",
"folderPath": "/reports/2024/q4",
"scope": "organization"
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate"
payload = {
"name": "My Dashboard Copy",
"folderPath": "/reports/2024/q4",
"scope": "organization"
}
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({
name: 'My Dashboard Copy',
folderPath: '/reports/2024/q4',
scope: 'organization'
})
};
fetch('https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate', 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://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate",
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([
'name' => 'My Dashboard Copy',
'folderPath' => '/reports/2024/q4',
'scope' => 'organization'
]),
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://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate"
payload := strings.NewReader("{\n \"name\": \"My Dashboard Copy\",\n \"folderPath\": \"/reports/2024/q4\",\n \"scope\": \"organization\"\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))
}HttpResponse<String> response = Unirest.post("https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Dashboard Copy\",\n \"folderPath\": \"/reports/2024/q4\",\n \"scope\": \"organization\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/documents/{documentId}/duplicate")
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 \"name\": \"My Dashboard Copy\",\n \"folderPath\": \"/reports/2024/q4\",\n \"scope\": \"organization\"\n}"
response = http.request(request)
puts response.read_body{
"dashboardId": "abc123-dash-id",
"identifier": "xyz789-new-identifier",
"name": "My Dashboard Copy",
"workbookId": "def456-workbook-id"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
Document identifier
Query Parameters
Requires an Organization API key. Optional user ID that attributes the action to the specified user.
Body
application/json
The name for the duplicated document
Required string length:
1 - 255Path to the destination folder. If not provided, the document will be duplicated to the root.
The visibility scope for the duplicated document.
If not provided, inherits from the destination folder or defaults to restricted.
Available options:
organization, restricted Was this page helpful?
⌘I

