Preview
curl --request POST \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview \
--header 'Content-Type: application/json' \
--data '
{
"templateId": "<string>",
"projectId": "<string>",
"scope": {
"mode": "explicit",
"slotIds": [
"<string>"
]
},
"locale": "en",
"draftSettings": {
"page": {},
"showCover": true,
"showIndex": true,
"showDisclaimer": true,
"showHeader": true,
"showFooter": true,
"blockGap": 6,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"categoryVariants": [
{
"id": "<string>",
"categoryIds": [
"<string>"
],
"subcategoryIds": [
"<string>"
],
"includeCover": true,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"name": "<string>"
}
],
"variantOrder": [
"<string>"
],
"builderPages": [
{
"kind": "pdf",
"id": "<string>",
"name": "<string>",
"assetId": "<string>",
"pageCount": 100
}
],
"pageOrder": [
"<string>"
],
"pagePresentation": {},
"pageBlocks": {
"cover": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"index": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"disclaimer": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
]
}
},
"frameNonce": "<string>"
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview"
payload = {
"templateId": "<string>",
"projectId": "<string>",
"scope": {
"mode": "explicit",
"slotIds": ["<string>"]
},
"locale": "en",
"draftSettings": {
"page": {},
"showCover": True,
"showIndex": True,
"showDisclaimer": True,
"showHeader": True,
"showFooter": True,
"blockGap": 6,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"categoryVariants": [
{
"id": "<string>",
"categoryIds": ["<string>"],
"subcategoryIds": ["<string>"],
"includeCover": True,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"name": "<string>"
}
],
"variantOrder": ["<string>"],
"builderPages": [
{
"kind": "pdf",
"id": "<string>",
"name": "<string>",
"assetId": "<string>",
"pageCount": 100
}
],
"pageOrder": ["<string>"],
"pagePresentation": {},
"pageBlocks": {
"cover": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"index": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"disclaimer": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
]
}
},
"frameNonce": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '<string>',
projectId: '<string>',
scope: {mode: 'explicit', slotIds: ['<string>']},
locale: 'en',
draftSettings: {
page: {},
showCover: true,
showIndex: true,
showDisclaimer: true,
showHeader: true,
showFooter: true,
blockGap: 6,
blocks: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
categoryVariants: [
{
id: '<string>',
categoryIds: ['<string>'],
subcategoryIds: ['<string>'],
includeCover: true,
blocks: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
name: '<string>'
}
],
variantOrder: ['<string>'],
builderPages: [
{
kind: 'pdf',
id: '<string>',
name: '<string>',
assetId: '<string>',
pageCount: 100
}
],
pageOrder: ['<string>'],
pagePresentation: {},
pageBlocks: {
cover: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
index: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
disclaimer: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
]
}
},
frameNonce: '<string>'
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'templateId' => '<string>',
'projectId' => '<string>',
'scope' => [
'mode' => 'explicit',
'slotIds' => [
'<string>'
]
],
'locale' => 'en',
'draftSettings' => [
'page' => [
],
'showCover' => true,
'showIndex' => true,
'showDisclaimer' => true,
'showHeader' => true,
'showFooter' => true,
'blockGap' => 6,
'blocks' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'categoryVariants' => [
[
'id' => '<string>',
'categoryIds' => [
'<string>'
],
'subcategoryIds' => [
'<string>'
],
'includeCover' => true,
'blocks' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'name' => '<string>'
]
],
'variantOrder' => [
'<string>'
],
'builderPages' => [
[
'kind' => 'pdf',
'id' => '<string>',
'name' => '<string>',
'assetId' => '<string>',
'pageCount' => 100
]
],
'pageOrder' => [
'<string>'
],
'pagePresentation' => [
],
'pageBlocks' => [
'cover' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'index' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'disclaimer' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
]
]
],
'frameNonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview"
payload := strings.NewReader("{\n \"templateId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"scope\": {\n \"mode\": \"explicit\",\n \"slotIds\": [\n \"<string>\"\n ]\n },\n \"locale\": \"en\",\n \"draftSettings\": {\n \"page\": {},\n \"showCover\": true,\n \"showIndex\": true,\n \"showDisclaimer\": true,\n \"showHeader\": true,\n \"showFooter\": true,\n \"blockGap\": 6,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"categoryVariants\": [\n {\n \"id\": \"<string>\",\n \"categoryIds\": [\n \"<string>\"\n ],\n \"subcategoryIds\": [\n \"<string>\"\n ],\n \"includeCover\": true,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"name\": \"<string>\"\n }\n ],\n \"variantOrder\": [\n \"<string>\"\n ],\n \"builderPages\": [\n {\n \"kind\": \"pdf\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"assetId\": \"<string>\",\n \"pageCount\": 100\n }\n ],\n \"pageOrder\": [\n \"<string>\"\n ],\n \"pagePresentation\": {},\n \"pageBlocks\": {\n \"cover\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"index\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"disclaimer\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ]\n }\n },\n \"frameNonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview")
.header("Content-Type", "application/json")
.body("{\n \"templateId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"scope\": {\n \"mode\": \"explicit\",\n \"slotIds\": [\n \"<string>\"\n ]\n },\n \"locale\": \"en\",\n \"draftSettings\": {\n \"page\": {},\n \"showCover\": true,\n \"showIndex\": true,\n \"showDisclaimer\": true,\n \"showHeader\": true,\n \"showFooter\": true,\n \"blockGap\": 6,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"categoryVariants\": [\n {\n \"id\": \"<string>\",\n \"categoryIds\": [\n \"<string>\"\n ],\n \"subcategoryIds\": [\n \"<string>\"\n ],\n \"includeCover\": true,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"name\": \"<string>\"\n }\n ],\n \"variantOrder\": [\n \"<string>\"\n ],\n \"builderPages\": [\n {\n \"kind\": \"pdf\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"assetId\": \"<string>\",\n \"pageCount\": 100\n }\n ],\n \"pageOrder\": [\n \"<string>\"\n ],\n \"pagePresentation\": {},\n \"pageBlocks\": {\n \"cover\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"index\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"disclaimer\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ]\n }\n },\n \"frameNonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"scope\": {\n \"mode\": \"explicit\",\n \"slotIds\": [\n \"<string>\"\n ]\n },\n \"locale\": \"en\",\n \"draftSettings\": {\n \"page\": {},\n \"showCover\": true,\n \"showIndex\": true,\n \"showDisclaimer\": true,\n \"showHeader\": true,\n \"showFooter\": true,\n \"blockGap\": 6,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"categoryVariants\": [\n {\n \"id\": \"<string>\",\n \"categoryIds\": [\n \"<string>\"\n ],\n \"subcategoryIds\": [\n \"<string>\"\n ],\n \"includeCover\": true,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"name\": \"<string>\"\n }\n ],\n \"variantOrder\": [\n \"<string>\"\n ],\n \"builderPages\": [\n {\n \"kind\": \"pdf\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"assetId\": \"<string>\",\n \"pageCount\": 100\n }\n ],\n \"pageOrder\": [\n \"<string>\"\n ],\n \"pagePresentation\": {},\n \"pageBlocks\": {\n \"cover\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"index\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"disclaimer\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ]\n }\n },\n \"frameNonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Report Previews
Preview
POST
/
v1
/
workspaces
/
{workspaceId}
/
report-templates
/
preview
Preview
curl --request POST \
--url https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview \
--header 'Content-Type: application/json' \
--data '
{
"templateId": "<string>",
"projectId": "<string>",
"scope": {
"mode": "explicit",
"slotIds": [
"<string>"
]
},
"locale": "en",
"draftSettings": {
"page": {},
"showCover": true,
"showIndex": true,
"showDisclaimer": true,
"showHeader": true,
"showFooter": true,
"blockGap": 6,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"categoryVariants": [
{
"id": "<string>",
"categoryIds": [
"<string>"
],
"subcategoryIds": [
"<string>"
],
"includeCover": true,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"name": "<string>"
}
],
"variantOrder": [
"<string>"
],
"builderPages": [
{
"kind": "pdf",
"id": "<string>",
"name": "<string>",
"assetId": "<string>",
"pageCount": 100
}
],
"pageOrder": [
"<string>"
],
"pagePresentation": {},
"pageBlocks": {
"cover": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"index": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
],
"disclaimer": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": true
}
}
]
}
},
"frameNonce": "<string>"
}
'import requests
url = "https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview"
payload = {
"templateId": "<string>",
"projectId": "<string>",
"scope": {
"mode": "explicit",
"slotIds": ["<string>"]
},
"locale": "en",
"draftSettings": {
"page": {},
"showCover": True,
"showIndex": True,
"showDisclaimer": True,
"showHeader": True,
"showFooter": True,
"blockGap": 6,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"categoryVariants": [
{
"id": "<string>",
"categoryIds": ["<string>"],
"subcategoryIds": ["<string>"],
"includeCover": True,
"blocks": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"name": "<string>"
}
],
"variantOrder": ["<string>"],
"builderPages": [
{
"kind": "pdf",
"id": "<string>",
"name": "<string>",
"assetId": "<string>",
"pageCount": 100
}
],
"pageOrder": ["<string>"],
"pagePresentation": {},
"pageBlocks": {
"cover": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"index": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
],
"disclaimer": [
{
"id": "<string>",
"type": "heading",
"props": {
"text": "<string>",
"size": 1.75,
"repeatEveryPage": True
}
}
]
}
},
"frameNonce": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: '<string>',
projectId: '<string>',
scope: {mode: 'explicit', slotIds: ['<string>']},
locale: 'en',
draftSettings: {
page: {},
showCover: true,
showIndex: true,
showDisclaimer: true,
showHeader: true,
showFooter: true,
blockGap: 6,
blocks: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
categoryVariants: [
{
id: '<string>',
categoryIds: ['<string>'],
subcategoryIds: ['<string>'],
includeCover: true,
blocks: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
name: '<string>'
}
],
variantOrder: ['<string>'],
builderPages: [
{
kind: 'pdf',
id: '<string>',
name: '<string>',
assetId: '<string>',
pageCount: 100
}
],
pageOrder: ['<string>'],
pagePresentation: {},
pageBlocks: {
cover: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
index: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
],
disclaimer: [
{
id: '<string>',
type: 'heading',
props: {text: '<string>', size: 1.75, repeatEveryPage: true}
}
]
}
},
frameNonce: '<string>'
})
};
fetch('https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview', 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://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'templateId' => '<string>',
'projectId' => '<string>',
'scope' => [
'mode' => 'explicit',
'slotIds' => [
'<string>'
]
],
'locale' => 'en',
'draftSettings' => [
'page' => [
],
'showCover' => true,
'showIndex' => true,
'showDisclaimer' => true,
'showHeader' => true,
'showFooter' => true,
'blockGap' => 6,
'blocks' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'categoryVariants' => [
[
'id' => '<string>',
'categoryIds' => [
'<string>'
],
'subcategoryIds' => [
'<string>'
],
'includeCover' => true,
'blocks' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'name' => '<string>'
]
],
'variantOrder' => [
'<string>'
],
'builderPages' => [
[
'kind' => 'pdf',
'id' => '<string>',
'name' => '<string>',
'assetId' => '<string>',
'pageCount' => 100
]
],
'pageOrder' => [
'<string>'
],
'pagePresentation' => [
],
'pageBlocks' => [
'cover' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'index' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
],
'disclaimer' => [
[
'id' => '<string>',
'type' => 'heading',
'props' => [
'text' => '<string>',
'size' => 1.75,
'repeatEveryPage' => true
]
]
]
]
],
'frameNonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview"
payload := strings.NewReader("{\n \"templateId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"scope\": {\n \"mode\": \"explicit\",\n \"slotIds\": [\n \"<string>\"\n ]\n },\n \"locale\": \"en\",\n \"draftSettings\": {\n \"page\": {},\n \"showCover\": true,\n \"showIndex\": true,\n \"showDisclaimer\": true,\n \"showHeader\": true,\n \"showFooter\": true,\n \"blockGap\": 6,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"categoryVariants\": [\n {\n \"id\": \"<string>\",\n \"categoryIds\": [\n \"<string>\"\n ],\n \"subcategoryIds\": [\n \"<string>\"\n ],\n \"includeCover\": true,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"name\": \"<string>\"\n }\n ],\n \"variantOrder\": [\n \"<string>\"\n ],\n \"builderPages\": [\n {\n \"kind\": \"pdf\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"assetId\": \"<string>\",\n \"pageCount\": 100\n }\n ],\n \"pageOrder\": [\n \"<string>\"\n ],\n \"pagePresentation\": {},\n \"pageBlocks\": {\n \"cover\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"index\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"disclaimer\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ]\n }\n },\n \"frameNonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview")
.header("Content-Type", "application/json")
.body("{\n \"templateId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"scope\": {\n \"mode\": \"explicit\",\n \"slotIds\": [\n \"<string>\"\n ]\n },\n \"locale\": \"en\",\n \"draftSettings\": {\n \"page\": {},\n \"showCover\": true,\n \"showIndex\": true,\n \"showDisclaimer\": true,\n \"showHeader\": true,\n \"showFooter\": true,\n \"blockGap\": 6,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"categoryVariants\": [\n {\n \"id\": \"<string>\",\n \"categoryIds\": [\n \"<string>\"\n ],\n \"subcategoryIds\": [\n \"<string>\"\n ],\n \"includeCover\": true,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"name\": \"<string>\"\n }\n ],\n \"variantOrder\": [\n \"<string>\"\n ],\n \"builderPages\": [\n {\n \"kind\": \"pdf\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"assetId\": \"<string>\",\n \"pageCount\": 100\n }\n ],\n \"pageOrder\": [\n \"<string>\"\n ],\n \"pagePresentation\": {},\n \"pageBlocks\": {\n \"cover\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"index\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"disclaimer\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ]\n }\n },\n \"frameNonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.specurate.com/api/v1/workspaces/{workspaceId}/report-templates/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"<string>\",\n \"projectId\": \"<string>\",\n \"scope\": {\n \"mode\": \"explicit\",\n \"slotIds\": [\n \"<string>\"\n ]\n },\n \"locale\": \"en\",\n \"draftSettings\": {\n \"page\": {},\n \"showCover\": true,\n \"showIndex\": true,\n \"showDisclaimer\": true,\n \"showHeader\": true,\n \"showFooter\": true,\n \"blockGap\": 6,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"categoryVariants\": [\n {\n \"id\": \"<string>\",\n \"categoryIds\": [\n \"<string>\"\n ],\n \"subcategoryIds\": [\n \"<string>\"\n ],\n \"includeCover\": true,\n \"blocks\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"name\": \"<string>\"\n }\n ],\n \"variantOrder\": [\n \"<string>\"\n ],\n \"builderPages\": [\n {\n \"kind\": \"pdf\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"assetId\": \"<string>\",\n \"pageCount\": 100\n }\n ],\n \"pageOrder\": [\n \"<string>\"\n ],\n \"pagePresentation\": {},\n \"pageBlocks\": {\n \"cover\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"index\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ],\n \"disclaimer\": [\n {\n \"id\": \"<string>\",\n \"type\": \"heading\",\n \"props\": {\n \"text\": \"<string>\",\n \"size\": 1.75,\n \"repeatEveryPage\": true\n }\n }\n ]\n }\n },\n \"frameNonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}Path Parameters
Body
application/json
Minimum string length:
1Minimum string length:
1- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Available options:
en, es, zh, ja, fr, de Show child attributes
Show child attributes
Required string length:
16 - 160Response
201 - application/json
The response is of type object.
⌘I