Skip to content

A template’s versions

GET
/orgs/{org}/templates/{id}/versions
curl --request GET \
--url 'https://api.sloose.com/orgs/org_9f3c/templates/b3f1c8a2/versions?limit=50' \
--header 'Authorization: Bearer <token>'

Its history, newest first: one version for every change to its configuration — made by a person, an API token, an agent over MCP or a configuration repo’s push — each with the recipe it held, migrated to the current schema version on read, and the import it was saved from when it was. The template’s own version is the newest. A page at a time — limit and cursor, answering nextCursor.

org
required

The organisation id the session was issued for. A token for one organisation can never read another.

string
Example
org_9f3c

The organisation id the session was issued for. A token for one organisation can never read another.

id
required

The template id.

string
Example
b3f1c8a2

The template id.

limit

How many to return, at most 200; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.

string
Example
50

How many to return, at most 200; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.

cursor

The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s version order, and a malformed one is 400 INVALID_CURSOR.

string

The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s version order, and a malformed one is 400 INVALID_CURSOR.

A page of its versions, newest first.

Media typeapplication/json
object
versions
required
Array<object>
object
id
required
string
templateId
required
string
version
required
integer
config
required

The recipe at this version, migrated to the current schema version on read. Null when it could not be migrated.

object | null
unreadable
required

Why config could not be migrated, when it could not.

string | null
enabledModules
required
Array<string>
registryVersion
required

The configuration version the recipe was built against, as its save REPORTED it (#616): an agent’s save over MCP stamps the version it checked the recipe against, and a repository’s push the version it wrote (none when another write landed while it wrote the configuration, which it checks before its templates; one landing while the templates are saved is outside that check, and the stamp stays, #650); any other save, the registryVersion it sent — a label the server stores for any version the organisation has reached, not one it checked. null when the save said none.

number | null
madeBy
required

Who made it: a person, a person’s API token, an agent over MCP, or a configuration repo’s push. History, not a lock — only managedBy on the template refuses changes.

string
Allowed values: user token mcp sdk
madeByUserId
required

The person, or the person a token or an agent acted for.

string | null
madeByName
required

Their name, or their address when they have cleared it — including somebody who has since left the organisation. A deleted person reads as one.

string | null
fromImportId
required

The import it was saved from. Null for a version that came from no import, or once that import has gone.

string | null
note
required
string | null
createdAt
required
string
nextCursor
required

Pass as cursor for the next page; null when this was the last.

string | null
Example
{
"versions": [
{
"madeBy": "user"
}
]
}

cursor is malformed (code: INVALID_CURSOR).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No bearer, or one that no longer resolves: a session that is unknown or expired (code: AUTH_REQUIRED), or an API token that was revoked or expired (TOKEN_REVOKED, TOKEN_EXPIRED), whose organisation is gone (ORG_NOT_FOUND) or whose member or user row is (MEMBERSHIP_GONE).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low (code: ROLE_REQUIRED), or it was issued for a different organisation; the organisation has been closed (code: ORG_CLOSED, either kind of bearer); the person is banned (code: BANNED, a session); or it is a session that is signed in but in no organisation (code: NO_ORG): one that never joined one, or whose person was taken out of the one it was in, or left it. Signing in again changes nothing for NO_ORG; choosing or making an organisation does.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such template, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com