Get Template
The get template endpoint allows you to retrieve information about a specific template.
Request
GET /v1/templates/{template_id}
Path Parameters
Parameter | Type | Description |
---|---|---|
template_id | string | The unique identifier of the template to retrieve |
Response
{
"id": string,
"name": string,
"created_at": string,
"file_size": number,
"sha256": string,
"tags": TagMeta[],
}
The TagMeta
type is defined as follows:
{
name: string;
shape: "standalone" | "container";
children?: TagMeta[];
}
Response Fields
Field | Type | Description |
---|---|---|
id | string | Unique identifier of the template |
name | string | Name of the template |
created_at | string | ISO 8601 timestamp of when the template was created (e.g. "2024-01-01T12:00:00Z") |
file_size | number | Size of the template file in bytes |
sha256 | string | SHA-256 hash of the template file |
tags | array | Array of tag objects containing placeholder information |
Examples
const apiKey = "Your_API_Key";
const templateId = "template_123";
const response = await fetch(`https://templatedocs.io/api/v1/templates/${templateId}`, {
headers: {
"Authorization": `Bearer ${apiKey}`
}
});
const template = await response.json();
console.log(template);