Get the version index map of a canvas
curl --request GET \
--url https://api.tela.com/prompt-version/index-map \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/prompt-version/index-map"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/prompt-version/index-map', 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.tela.com/prompt-version/index-map",
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.tela.com/prompt-version/index-map"
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.tela.com/prompt-version/index-map")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/prompt-version/index-map")
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{
"data": [
{
"id": "9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f",
"versionIndex": 3,
"previousVersionId": "8c1d3e5f-0a2b-4c4d-9e6f-0a1b2c3d4e5f"
},
{
"id": "8c1d3e5f-0a2b-4c4d-9e6f-0a1b2c3d4e5f",
"versionIndex": 2,
"previousVersionId": "7b0c2d4e-9f1a-4b3c-8d5e-9f0a1b2c3d4e"
},
{
"id": "7b0c2d4e-9f1a-4b3c-8d5e-9f0a1b2c3d4e",
"versionIndex": 1,
"previousVersionId": null
}
]
}Prompt Version
Get the version index map of a canvas
Returns every non-deleted version id of the canvas with its 1-based versionIndex (1 is the oldest) and the id of the version created immediately before it.
GET
/
prompt-version
/
index-map
Get the version index map of a canvas
curl --request GET \
--url https://api.tela.com/prompt-version/index-map \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tela.com/prompt-version/index-map"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tela.com/prompt-version/index-map', 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.tela.com/prompt-version/index-map",
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.tela.com/prompt-version/index-map"
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.tela.com/prompt-version/index-map")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tela.com/prompt-version/index-map")
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{
"data": [
{
"id": "9d2e4f6a-1b3c-4d5e-8f70-1a2b3c4d5e6f",
"versionIndex": 3,
"previousVersionId": "8c1d3e5f-0a2b-4c4d-9e6f-0a1b2c3d4e5f"
},
{
"id": "8c1d3e5f-0a2b-4c4d-9e6f-0a1b2c3d4e5f",
"versionIndex": 2,
"previousVersionId": "7b0c2d4e-9f1a-4b3c-8d5e-9f0a1b2c3d4e"
},
{
"id": "7b0c2d4e-9f1a-4b3c-8d5e-9f0a1b2c3d4e",
"versionIndex": 1,
"previousVersionId": null
}
]
}