List templates
GET
/v1/templates
curl -H "X-Api-Key: $KEY" "http://localhost:9027/v1/templates?limit=20"const response = await fetch('http://localhost:9027/v1/templates?limit=20', { headers: { 'X-Api-Key': process.env.KEY },});if (!response.ok) throw new Error(await response.text());console.log(await response.json());import os
import requests
response = requests.get( "http://localhost:9027/v1/templates?limit=20", headers={"X-Api-Key": os.environ["KEY"]},)response.raise_for_status()print(response.json())package main
import ( "io" "log" "net/http" "os")
func main() { request, err := http.NewRequest("GET", "http://localhost:9027/v1/templates?limit=20", nil) if err != nil { log.Fatal(err) } request.Header.Set("X-Api-Key", os.Getenv("KEY"))
response, err := http.DefaultClient.Do(request) if err != nil { log.Fatal(err) } defer response.Body.Close() if response.StatusCode >= 300 { message, _ := io.ReadAll(response.Body) log.Fatalf("%s: %s", response.Status, message) } if _, err := io.Copy(os.Stdout, response.Body); err != nil { log.Fatal(err) }}Lists this caller’s templates, oldest first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer | null
How many to return, up to 200. Default 50.
cursor
string | null
nextCursor from the page before.
Responses
Section titled “Responses”A page of templates
Media typeapplication/json
One page of templates.
object
nextCursor
Pass as cursor for the next page. Absent on the last.
string | null
templates
required
Array<object>
A stored template.
object
createdAt
required
RFC 3339.
string
format
required
string
id
required
Pass as templateId to /v1/render, /v1/render/batch or /v1/templates/validate,
or point an alias at it with PUT /v1/aliases/{name}.
string
name
required
string
sha256
required
Hex SHA-256 of the content.
string
size
required
integer format: int64
Example
{ "templates": [ { "format": "docx", "id": "01966f3e-7c1a-7d3c-9a44-1d2f5a6b7c8d", "name": "invoice.docx" } ]}RUSTICDOC_STORE is not set
Media typeapplication/json
The JSON body of every error response.
object
error
required
A stable, machine-readable kind.
string
message
required
What went wrong, for a person.
string
Example
{ "error": "invalid_request", "message": "unknown step 'teleport'"}The store cannot be reached
Media typeapplication/json
The JSON body of every error response.
object
error
required
A stable, machine-readable kind.
string
message
required
What went wrong, for a person.
string
Example
{ "error": "invalid_request", "message": "unknown step 'teleport'"}