cURL
curl --request POST \ --url https://control-plane.kubiya.ai/api/v1/templates/extract-variables \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "template": "User {{user}} accessing {{.secret.database}} on {{.env.HOST}}" } '
{ "env_vars": [ "HOST" ], "secrets": [ "database" ], "simple_vars": [ "user" ], "variables": [ { "display_name": "user", "end": 13, "name": "user", "raw": "{{user}}", "start": 5, "type": "simple" } ] }
Extract all variables from a template without validation or compilation.
Useful for:
Request schema for extracting variables from a template.
Template string to analyze
1
Successful Response
Response schema for variable extraction endpoint.
All variables found in template
Show child attributes
Variable name (e.g., 'api_key' or 'secret.github_token')
Variable type: 'simple', 'secret', or 'env'
Raw template string (e.g., '{{.secret.api_key}}')
Start position in template
End position in template
Display name without type prefix
Secret names required
Environment variable names required
Simple variable names required
Was this page helpful?