Skip to main content
POST
/
v1
/
views
/
{id}
/
duplicate
Duplicate a view!
curl --request POST \
  --url https://platform.thena.ai/v1/views/{id}/duplicate \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://platform.thena.ai/v1/views/{id}/duplicate"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch('https://platform.thena.ai/v1/views/{id}/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://platform.thena.ai/v1/views/{id}/duplicate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  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://platform.thena.ai/v1/views/{id}/duplicate"

	req, _ := http.NewRequest("POST", 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.post("https://platform.thena.ai/v1/views/{id}/duplicate")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://platform.thena.ai/v1/views/{id}/duplicate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "status": true,
  "message": "Success",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": {
    "id": "<string>",
    "teamId": "<string>",
    "viewId": 123,
    "name": "<string>",
    "description": "<string>",
    "configuration": {},
    "viewsTypeId": "<string>",
    "viewsType": "<string>",
    "owner": "<string>",
    "ownerId": "<string>",
    "isShared": true,
    "isPersonal": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Enter the bearer token

Path Parameters

id
string
required

Response

Operation successful

status
boolean
default:true
required

The status of the response

message
string
default:Success
required

The message of the response

timestamp
string<date-time>
default:2024-01-01T00:00:00.000Z
required

The timestamp of the response

data
object
required

The response for create/update/delete view operations