Skip to main content
GET
/
v1
/
replica
/
{id}
/
canvas
/
{filename}
Get Canvas Item
curl --request GET \
  --url https://api.tryreplicas.com/v1/replica/{id}/canvas/{filename} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.tryreplicas.com/v1/replica/{id}/canvas/{filename}"

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

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

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

fetch('https://api.tryreplicas.com/v1/replica/{id}/canvas/{filename}', 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.tryreplicas.com/v1/replica/{id}/canvas/{filename}",
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.tryreplicas.com/v1/replica/{id}/canvas/{filename}"

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.tryreplicas.com/v1/replica/{id}/canvas/{filename}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.tryreplicas.com/v1/replica/{id}/canvas/{filename}")

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
{
  "filename": "<string>",
  "sizeBytes": 123,
  "mimeType": "<string>",
  "content": "<string>",
  "base64": "<string>",
  "tooLarge": true
}
{
"error": "<string>",
"details": "<string>"
}
{
"error": "<string>",
"details": "<string>"
}
{
"error": "<string>",
"details": "<string>"
}
{
"error": "<string>",
"details": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Obtain your API key from the Replicas dashboard under Preferences → Organization → Settings → API Keys.

Path Parameters

id
string<uuid>
required

The unique identifier of the replica

filename
string
required

The Canvas item filename, including extension (e.g. example-plan.md).

Response

Successful response

A single Canvas item's content. Text kinds populate content; binary kinds populate base64. Items over the 5 MB per-file cap return tooLarge: true with neither payload populated.

filename
string
required
kind
enum<string>
required

The kind of Canvas item, inferred from its file extension.

Available options:
markdown,
html,
image,
video,
audio,
other
sizeBytes
integer
required
mimeType
string
required

MIME type to render the content with (e.g. text/markdown; charset=utf-8, image/png).

content
string

UTF-8 text for markdown / html kinds.

base64
string

Base64 payload for image / video / audio / other kinds.

tooLarge
boolean

Present and true when the file exceeded the engine's per-file size cap.