Element Versions
REST endpoints for element versions. Bearer-auth required.
GET /api/element-versions
List element versions.
Query parameters
limit(optional): Page size (1–100, default 100).after(optional): Keyset cursor — return the page after this row (next page).before(optional): Keyset cursor — return the page before this row (prev page).ids(optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).filter(optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.orderBy(optional): Multi-key sort (<Entity>OrderBy[]): array of{ field: direction }applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.element_id(optional): Optional element narrower. Admins see every version when omitted; non-admin callers must scope by element.include_deleted(optional): Soft-deleted version visibility.false(default) — active rows only.true— active plus soft-deleted.only— soft-deleted only.parent_id(optional): Shorthand: filter whereparentIdequals this value.status(optional): Shorthand: filter wherestatusequals this value.bundle_version_id(optional): Shorthand: filter wherebundleVersionIdequals this value.
Response
{
"data": [
{
"id": "<...>",
"elementId": "<...>",
"name": "<...>",
"parentId": "<...>",
"status": "<...>",
"error": "<...>",
"exportName": "<...>",
"bundleVersionId": "<...>",
"createdAt": "<...>",
"updatedAt": "<...>"
}
],
"pageInfo": {
"total": "number",
"hasNextPage": "boolean",
"hasPreviousPage": "boolean",
"startCursor": "string",
"endCursor": "string"
}
}POST /api/element-versions
Create element version
Request body
{
"elementId": "string",
"name?": "string",
"parentId?": "string"
}Response
{
"id": "string",
"elementId": "string",
"name": "string",
"parentId": "string",
"status": "pending | ready | failed",
"error": "string",
"exportName": "string",
"bundleVersionId": "string",
"createdAt": "string",
"updatedAt": "string"
}GET /api/element-versions/{id}
Get an element version by ID.
Path parameters
id(required): Element version to retrieve.
Response
{
"id": "string",
"elementId": "string",
"name": "string",
"parentId": "string",
"status": "pending | ready | failed",
"error": "string",
"exportName": "string",
"bundleVersionId": "string",
"createdAt": "string",
"updatedAt": "string"
}DELETE /api/element-versions/{id}
Soft-delete an element version.
Path parameters
id(required): Element version to soft-delete.
Response
{
"success": "boolean"
}DELETE /api/element-versions/{id}/purge
Permanently delete a soft-deleted element version.
Path parameters
id(required): Soft-deleted element version to permanently delete.
Response
{
"success": "boolean"
}POST /api/element-versions/{id}/restore
Restore a soft-deleted element version.
Path parameters
id(required): Soft-deleted element version to restore.
Response
{
"id": "string",
"elementId": "string",
"name": "string",
"parentId": "string",
"status": "pending | ready | failed",
"error": "string",
"exportName": "string",
"bundleVersionId": "string",
"createdAt": "string",
"updatedAt": "string"
}GET /api/element-versions/{versionId}/files
List files in a specific element version
Path parameters
versionId(required): The element version's prefixed ID (e.g.elmver_...).
Query parameters
path(optional): Directory path to list (omit for the element root).
Response
{
"data": [
{
"name": "<...>",
"path": "<...>",
"isDirectory": "<...>",
"size": "<...>"
}
]
}POST /api/element-versions/{versionId}/files
Create a file in a specific element version
Path parameters
versionId(required): The element version's prefixed ID (e.g.elmver_...).
Request body
{
"path": "string",
"content": "string"
}Response
{
"success": "boolean"
}PATCH /api/element-versions/{versionId}/files
Update a file in a specific element version
Path parameters
versionId(required): The element version's prefixed ID (e.g.elmver_...).
Request body
{
"path": "string",
"content": "string"
}Response
{
"success": "boolean"
}DELETE /api/element-versions/{versionId}/files
Delete a file from a specific element version
Path parameters
versionId(required): The element version's prefixed ID (e.g.elmver_...).
Query parameters
path(required): File path to delete, relative to the element root.
Response
{
"success": "boolean"
}GET /api/element-versions/{versionId}/files/read
Read a file's content from a specific element version
Path parameters
versionId(required): The element version's prefixed ID (e.g.elmver_...).
Query parameters
path(required): File path to read, relative to the element root.
Response
{
"content": "string",
"contentType": "string"
}