Skip to content
Skip to Content
Coder Docs

Get template version dry-run by job ID

GET
/api/v2/templateversions/{templateversion}/dry-run/{jobID}

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

templateversion*string

Template version ID

Formatuuid
jobID*string

Job ID

Formatuuid

Response Body

OK

application/json
  1. response
available_workers?array<>
canceled_at?string
Formatdate-time
completed_at?string
Formatdate-time
created_at?string
Formatdate-time
error?string
error_code?string
Value in"REQUIRED_TEMPLATE_VARIABLES""INSUFFICIENT_QUOTA"
file_id?string
Formatuuid
id?string
Formatuuid
initiator_id?string
Formatuuid
input?
logs_overflowed?boolean
metadata?
organization_id?string
Formatuuid
queue_position?integer
queue_size?integer
started_at?string
Formatdate-time
status?string
Value in"pending""running""succeeded""canceling""canceled""failed"
tags?
type?codersdk.ProvisionerJobType
Value in"template_version_import""workspace_build""template_version_dry_run"
worker_id?string
Formatuuid
worker_name?string

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

curl -X GET \	"$CODER_URL/api/v2/templateversions/{templateversion}/dry-run/{jobID}" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN"
Example Response200
{  "available_workers": [    "13308a9d-95c9-4c48-be18-6b7d335b5cea"  ],  "canceled_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "error": "string",  "error_code": "REQUIRED_TEMPLATE_VARIABLES",  "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "initiator_id": "06588898-9a84-4b35-ba8f-f9cbd64946f3",  "input": {    "error": "string",    "template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1",    "workspace_build_id": "badaf2eb-96c5-4050-9f1d-db2d39ca5478"  },  "logs_overflowed": true,  "metadata": {    "template_display_name": "string",    "template_icon": "string",    "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",    "template_name": "string",    "template_version_name": "string",    "workspace_build_transition": "start",    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",    "workspace_name": "string"  },  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",  "queue_position": 0,  "queue_size": 0,  "started_at": "2019-08-24T14:15:22Z",  "status": "pending",  "tags": {    "property1": "string",    "property2": "string"  },  "type": "template_version_import",  "worker_id": "ae5fa6f7-c55b-40c1-b40a-b36ac467652b",  "worker_name": "string"}