List Block Definitions
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/templates/blocks-config \
--header 'X-Organization-id: <x-organization-id>'import requests
url = "https://reporter.sandbox.lerian.net/v1/templates/blocks-config"
headers = {"X-Organization-id": "<x-organization-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Organization-id': '<x-organization-id>'}};
fetch('https://reporter.sandbox.lerian.net/v1/templates/blocks-config', 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://reporter.sandbox.lerian.net/v1/templates/blocks-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Organization-id: <x-organization-id>"
],
]);
$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://reporter.sandbox.lerian.net/v1/templates/blocks-config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-id", "<x-organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
.header("X-Organization-id", "<x-organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-id"] = '<x-organization-id>'
response = http.request(request)
puts response.read_body{
"blocks": [
{
"type": "loop",
"label": "Loop",
"category": "control",
"acceptsChildren": true,
"properties": [
{
"name": "collection",
"type": "string",
"required": true
}
]
},
{
"type": "field",
"label": "Field",
"category": "data",
"acceptsChildren": false,
"properties": [
{
"name": "path",
"type": "string",
"required": true
}
]
}
]
}List Block Definitions
Use this endpoint to retrieve the catalog of block types available in the template builder, including each block’s configurable properties and category. Use it to discover which building blocks you can combine when composing a template.
GET
/
v1
/
templates
/
blocks-config
List Block Definitions
curl --request GET \
--url https://reporter.sandbox.lerian.net/v1/templates/blocks-config \
--header 'X-Organization-id: <x-organization-id>'import requests
url = "https://reporter.sandbox.lerian.net/v1/templates/blocks-config"
headers = {"X-Organization-id": "<x-organization-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Organization-id': '<x-organization-id>'}};
fetch('https://reporter.sandbox.lerian.net/v1/templates/blocks-config', 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://reporter.sandbox.lerian.net/v1/templates/blocks-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Organization-id: <x-organization-id>"
],
]);
$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://reporter.sandbox.lerian.net/v1/templates/blocks-config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Organization-id", "<x-organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
.header("X-Organization-id", "<x-organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://reporter.sandbox.lerian.net/v1/templates/blocks-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Organization-id"] = '<x-organization-id>'
response = http.request(request)
puts response.read_body{
"blocks": [
{
"type": "loop",
"label": "Loop",
"category": "control",
"acceptsChildren": true,
"properties": [
{
"name": "collection",
"type": "string",
"required": true
}
]
},
{
"type": "field",
"label": "Field",
"category": "data",
"acceptsChildren": false,
"properties": [
{
"name": "path",
"type": "string",
"required": true
}
]
}
]
}Headers
The authorization token in the 'Bearer ' format.
Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.
The unique identifier of the Organization associated with the request.
Response
200 - application/json
The catalog of block definitions available in the template builder.
Available block definitions.
Show child attributes
Show child attributes
Was this page helpful?
⌘I

