Layerbeat

Preview a template's script

POST
/v1/templates/{id}/script

Returns exactly what an install would run on the server for these inputs: Layerbeat's short header (which passes your inputs as data and reports the result), then the template's install script, or your edited one.

Access: Public. No authentication required.

Path Parameters

id*string

Template ID, for example supabase.

Request Body

application/json
  1. body
inputs?
script?string

An edited install script to preview.

Response Body

The script

application/json
  1. response
template*string
version*string
action*"install"
Value in"install"
customized*boolean
bytes*integer
script*string

The full script, as the server receives it.

curl -X POST 'https://layerbeat.com/v1/templates/https-proxy/script' \  -H 'Content-Type: application/json' \  -d '{  "inputs": {    "domain": "app.example.com",    "upstream": "127.0.0.1:3000"  }}'
{  "template": "https-proxy",  "version": "1.0.0",  "action": "install",  "customized": false,  "bytes": 3120,  "script": "#!/bin/bash\n# Layerbeat template run (doc 052). Customer inputs are data: read them with lb_input.\nset -eEuo pipefail\n...\n# ---- https-proxy install.sh ----\ndomain=$(lb_input domain)\n..."}