Skip to content
Skip to Content
Coder Docs

Evaluate dynamic parameters for template version

POST
/api/v2/templateversions/{templateversion}/dynamic-parameters/evaluate

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

templateversion*string

Template version ID

Formatuuid

Request Body

Initial parameter values

application/json
  1. body
id?integer

ID identifies the request. The response contains the same ID so that the client can match it to the request.

inputs?
owner_id?string

OwnerID if uuid.Nil, it defaults to codersdk.Me

Formatuuid

Response Body

OK

application/json
  1. response
diagnostics?array<>
id?integer
parameters?array<>

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X POST \	"$CODER_URL/api/v2/templateversions/{templateversion}/dynamic-parameters/evaluate" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "id": 0,  "inputs": {    "property1": "string",    "property2": "string"  },  "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05"}'
Example Response200
{  "diagnostics": [    {      "detail": "string",      "extra": {        "code": "string"      },      "severity": "error",      "summary": "string"    }  ],  "id": 0,  "parameters": [    {      "default_value": {        "valid": true,        "value": "string"      },      "description": "string",      "diagnostics": [        {          "detail": "string",          "extra": {            "code": "string"          },          "severity": "error",          "summary": "string"        }      ],      "display_name": "string",      "ephemeral": true,      "form_type": "",      "icon": "string",      "mutable": true,      "name": "string",      "options": [        {          "description": "string",          "icon": "string",          "name": "string",          "value": {            "valid": true,            "value": "string"          }        }      ],      "order": 0,      "required": true,      "styling": {        "disabled": true,        "label": "string",        "mask_input": true,        "placeholder": "string"      },      "type": "string",      "validations": [        {          "validation_error": "string",          "validation_max": 0,          "validation_min": 0,          "validation_monotonic": "string",          "validation_regex": "string"        }      ],      "value": {        "valid": true,        "value": "string"      }    }  ]}