List Templates API
curl --request GET \
--url https://api.trysiren.io/api/v1/public/template \
--header 'Authorization: <authorization>'import requests
url = "https://api.trysiren.io/api/v1/public/template"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.trysiren.io/api/v1/public/template', 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.trysiren.io/api/v1/public/template",
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: <authorization>"
],
]);
$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.trysiren.io/api/v1/public/template"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.trysiren.io/api/v1/public/template")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysiren.io/api/v1/public/template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"totalElements": 0,
"totalPages": 0,
"size": 0,
"content": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"variables": [
{
"name": "string",
"defaultValue": "string"
}
],
"tags": [
"string"
],
"draftVersion": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
},
"publishedVersion": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
},
"templateVersions": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
}
]
}
],
"number": 0,
"sort": {
"empty": true,
"unsorted": true,
"sorted": true
},
"numberOfElements": 0,
"first": true,
"last": true,
"pageable": {
"offset": 0,
"sort": {
"empty": true,
"unsorted": true,
"sorted": true
},
"pageNumber": 0,
"paged": true,
"pageSize": 0,
"unpaged": true
},
"empty": true
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
},
"errors": [
{
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "NOT FOUND",
"message": "Not found"
},
"errors": [
{
"errorCode": "NOT FOUND",
"message": "Not found"
}
],
"meta": null
}
Template APIs
List Templates API
Fetch all templates with filtering and pagination
GET
/
api
/
v1
/
public
/
template
List Templates API
curl --request GET \
--url https://api.trysiren.io/api/v1/public/template \
--header 'Authorization: <authorization>'import requests
url = "https://api.trysiren.io/api/v1/public/template"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.trysiren.io/api/v1/public/template', 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.trysiren.io/api/v1/public/template",
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: <authorization>"
],
]);
$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.trysiren.io/api/v1/public/template"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.trysiren.io/api/v1/public/template")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysiren.io/api/v1/public/template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"totalElements": 0,
"totalPages": 0,
"size": 0,
"content": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"variables": [
{
"name": "string",
"defaultValue": "string"
}
],
"tags": [
"string"
],
"draftVersion": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
},
"publishedVersion": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
},
"templateVersions": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
}
]
}
],
"number": 0,
"sort": {
"empty": true,
"unsorted": true,
"sorted": true
},
"numberOfElements": 0,
"first": true,
"last": true,
"pageable": {
"offset": 0,
"sort": {
"empty": true,
"unsorted": true,
"sorted": true
},
"pageNumber": 0,
"paged": true,
"pageSize": 0,
"unpaged": true
},
"empty": true
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
},
"errors": [
{
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "NOT FOUND",
"message": "Not found"
},
"errors": [
{
"errorCode": "NOT FOUND",
"message": "Not found"
}
],
"meta": null
}
Header
string
required
Bearer token for API authentication. Format:
Bearer {{apiToken}}Query Parameters
string
Filter templates by tag names.
string
Search templates by field.
string
Sort templates by field.
integer
Page number for pagination. Default: 0.
integer
Number of items per page. Default: 10.
Response
object
integer
Total number of templates.
integer
Total number of pages.
integer
Page size.
array
List of template objects.
UUID
Template ID.
string
Template name.
string
Template description.
array
List of template tags.
object
object
integer
Current page number.
object
integer
Number of elements on this page.
boolean
Whether this is the first page.
boolean
Whether this is the last page.
object
boolean
Whether the result is empty.
object
Metadata object.
{
"data": {
"totalElements": 0,
"totalPages": 0,
"size": 0,
"content": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"variables": [
{
"name": "string",
"defaultValue": "string"
}
],
"tags": [
"string"
],
"draftVersion": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
},
"publishedVersion": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
},
"templateVersions": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"version": 0,
"status": "PUBLISHED_LATEST",
"publishedAt": "2024-08-30T07:31:07.380Z"
}
]
}
],
"number": 0,
"sort": {
"empty": true,
"unsorted": true,
"sorted": true
},
"numberOfElements": 0,
"first": true,
"last": true,
"pageable": {
"offset": 0,
"sort": {
"empty": true,
"unsorted": true,
"sorted": true
},
"pageNumber": 0,
"paged": true,
"pageSize": 0,
"unpaged": true
},
"empty": true
},
"error": null,
"errors": null,
"meta": null
}
{
"data": null,
"error": {
"errorCode": "BAD_REQUEST",
"message": "Bad request"
},
"errors": [
{
"errorCode": "BAD_REQUEST",
"message": "Bad request"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
},
"errors": [
{
"errorCode": "UNAUTHORISED",
"message": "Unauthorised"
}
],
"meta": null
}
{
"data": null,
"error": {
"errorCode": "NOT FOUND",
"message": "Not found"
},
"errors": [
{
"errorCode": "NOT FOUND",
"message": "Not found"
}
],
"meta": null
}
Status Codes
200- OK400- BAD REQUEST401- UNAUTHORISED404- NOT FOUND
Was this page helpful?