Skip to content
API console (try a request with your own key)Get early access

Get a template's fields

GET
/v1/templates/{templateId}
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
TEMPLATE_ID=c2b8f3a1-7e5d-4c9a-8f6b-1a2d3e4f5a6b # drawing, or a templateId from the list of templates
template=$(curl -sS --fail-with-body "$API/v1/templates/$TEMPLATE_ID" \
-H "$AUTH") || { echo "$template" >&2; exit 1; }
jq -r '"\(.name), version \(.version):"' <<<"$template"
jq -r '.fields[] as $field | " \($field.path) is called \"\($field.name)\""' <<<"$template"

Each field’s path (the key its values carry, never changed by a rename), name (the name on its values), standardName, order, required, alwaysCheck, section, definedBy and measured (measured for the four fields whose accuracy SpecCapture publishes, standard for the rest, notMeasured for sizes and counts); each table with its kept columns in order; the notes when delivered; and the export layout. Add ?version= for an earlier version: the one a job’s templateVersion names never changes.

templateId
required
string
version
integer format: int32

OK

Media typeapplication/json
object
templateId
required
string
name
required
string
version
required
integer format: int32
currentVersion
required
integer format: int32
isDefault
required
boolean
archived
required
boolean
definedBy
required
string
publishedAt
required
null | string format: date-time
basedOn
required
string
basedOnVersion
required
integer format: int32
fields
required
Array<object>
object
path
required
string
name
required
string
standardName
required
string
order
required
integer format: int32
required
required
boolean
alwaysCheck
required
boolean
section
required
null | string
definedBy
required
string
measured
required
Allowed values: measured standard notMeasured
tables
required
Array<object>
object
path
required
string
name
required
string
standardName
required
string
keyColumn
required
null | string
columns
required
Array<object>
object
path
required
string
name
required
string
standardName
required
string
notes
required
One of:
null
exportLayout
required
Allowed values: full valuesOnly

Bad Request: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type

A link to the code’s entry in the docs.

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId

This request’s trace: quote it when asking for help.

string

Not Found: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type

A link to the code’s entry in the docs.

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId

This request’s trace: quote it when asking for help.

string