Publish a version
Freeze a draft and make it the version a new record is put on.
This is the moment the structure stops moving. From here the version never changes again, and any further work starts another draft beside it. Records already on an earlier version stay on it and go on working exactly as they did, until somebody moves them deliberately.
Any section the version carries that is still a draft is published along with it, since a frozen version cannot rest on something that is still moving.
A change note is required from the second version of a template onwards, because it is what somebody deciding whether to move their records reads. The first version of a template needs none, having replaced nothing.
A version with no page, or with a page that has nothing on it, is refused: a structure nobody can fill is not one.
Parameters
Sent as JSON. Anything not listed here is ignored.
The id of the template. A path that is not a uuid answers 404 without a query being run, so neither the slug nor a sequential number reaches anything here.
The number of the version within its template, counting from 1, which is the number shown in the version history and the number a change note refers to. It is not a row id, so version 1 of one template and version 1 of another are different things reached through different templates.
What changed since the version before. Up to 65535 characters. Required from the second version of a template onwards.
Returns
The version, now published. A version that is not a draft answers 422, and so does one with an empty page or no page at all. A template belonging to somebody else answers 404.
The version.
Always structure_version. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.
The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.
Everything the record holds.
Which version this is within its template, counting from 1. It is what the address of this version takes, and what a change note refers to.
Either draft or published. A draft is still being designed and may be changed freely. A published version is frozen and never changes again, and stays published after a later version replaces it, so read published_version_number on the template to know which one a new record is put on.
What changed since the version before, written when this one was published, or null on a draft and on the first version of a template. It is what somebody deciding whether to move their records reads.
When the version was frozen, as a count of seconds, or null while it is a draft.
Always null. Publishing a later version does not retire the one it replaces, because the records still on it go on working exactly as they did.
How many records point at this precise version. A record follows the version it was put on until somebody moves it deliberately, so a retired version keeps a count above zero for as long as anything is still on it.
The number of the version this one was started from, or null on the first version of a template.
When the version was started, as a count of seconds.
When it last changed, as a count of seconds. Equal to created_at until it first changes. A published version never changes, so this stops moving at publication.
Where to find this record.
The absolute address this record is read from.
Rate limit
Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.
Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.