Skip to main content

Asset Versions API

The Asset Versions API provides version management for assets, including creating version snapshots, updating version metadata, archiving versions, and reverting to previous versions. Each version captures the state of an asset's files at a point in time.

Authorization

All endpoints require a valid JWT token in the Authorization header. Asset version operations are subject to two-tier Casbin authorization on the parent asset.

Free-text whitespace

Surrounding whitespace is removed from a submitted comment before the length constraint is applied and before the value is stored, so a subsequent read returns the trimmed value. A padded value whose trimmed length falls below the documented minimum is rejected with 400. Interior whitespace is preserved.


List asset versions​

Retrieves all versions for an asset.

GET /database/{databaseId}/assets/{assetId}/getVersions

Path parameters​

ParameterTypeRequiredDescription
databaseIdstringYesDatabase identifier
assetIdstringYesAsset identifier

Query parameters​

ParameterTypeRequiredDefaultDescription
maxItemsnumberNo1000Maximum number of items to return. Maximum 1000
pageSizenumberNo1000Number of items per page. Maximum 1000
startingTokenstringNonullPagination token from a previous response
showArchivedbooleanNofalseInclude archived versions

A maxItems or pageSize above 1000 is rejected with 400. For the token pattern, see Pagination.

Response​

{
"versions": [
{
"Version": "1",
"DateModified": "2026-03-15T10:30:00Z",
"Comment": "Initial version",
"description": "",
"createdBy": "user@example.com",
"isCurrent": true,
"fileCount": 12,
"versionAlias": "v1.0",
"isArchived": false,
"assetId": "my-asset",
"databaseId": "my-database"
}
],
"NextToken": null
}

Get a specific asset version​

Retrieves details for a specific asset version.

GET /database/{databaseId}/assets/{assetId}/getVersion/{assetVersionId}

Path parameters​

ParameterTypeRequiredDescription
databaseIdstringYesDatabase identifier
assetIdstringYesAsset identifier
assetVersionIdstringYesVersion identifier

Response​

Returns a single version object with full details including file listings.


Create an asset version​

Creates a new version snapshot of the asset's current state.

POST /database/{databaseId}/assets/{assetId}/createVersion

Path parameters​

ParameterTypeRequiredDescription
databaseIdstringYesDatabase identifier
assetIdstringYesAsset identifier

Request body​

FieldTypeRequiredDescription
commentstringYesComment for the version (1-256 characters).
useLatestFilesbooleanNoWhen true, snapshot the latest files in the asset's S3 bucket. Defaults to false.
filesarrayNoExplicit list of files and their S3 versions to include. Required unless useLatestFiles is true.
versionAliasstringNoHuman-readable version alias (up to 64 characters).

Provide either useLatestFiles set to true or a non-empty files list; the two are mutually exclusive. Each entry in files is an object with relativeKey, versionId (S3 version ID), and an optional isArchived flag.

Request body example​

{
"comment": "Updated building model with revised floor 3",
"useLatestFiles": true,
"versionAlias": "v1.1"
}

Response​

{
"success": true,
"message": "Asset version created successfully",
"assetId": "my-asset",
"assetVersionId": "v-abc123def",
"operation": "create",
"timestamp": "2026-03-15T10:30:00Z"
}

Update an asset version​

Updates the alias or comment on an existing asset version.

PUT /database/{databaseId}/assets/{assetId}/assetversions/{assetVersionId}

Path parameters​

ParameterTypeRequiredDescription
databaseIdstringYesDatabase identifier
assetIdstringYesAsset identifier
assetVersionIdstringYesVersion identifier

Request body​

FieldTypeRequiredDescription
versionAliasstringNoHuman-readable version alias
commentstringNoUpdated comment for the version

Request body example​

{
"versionAlias": "v2.0-release",
"comment": "Production-ready version"
}

Response​

{
"success": true,
"message": "Asset version updated successfully",
"assetId": "my-asset",
"assetVersionId": "v-abc123",
"operation": "update",
"timestamp": "2026-03-15T10:30:00Z"
}

Archive an asset version​

Archives an asset version, making it read-only.

POST /database/{databaseId}/assets/{assetId}/assetversions/{assetVersionId}/archive

Path parameters​

ParameterTypeRequiredDescription
databaseIdstringYesDatabase identifier
assetIdstringYesAsset identifier
assetVersionIdstringYesVersion identifier

Response​

{
"success": true,
"message": "Asset version archived successfully",
"assetId": "my-asset",
"assetVersionId": "v-abc123",
"operation": "archive",
"timestamp": "2026-03-15T10:30:00Z"
}

Error responses​

StatusDescription
400Invalid parameters, or an attempt to archive the current version. Set a different version as current first.
403Not authorized
500Internal server error

Unarchive an asset version​

Restores a previously archived asset version.

POST /database/{databaseId}/assets/{assetId}/assetversions/{assetVersionId}/unarchive

Path parameters​

Same as Archive an asset version.

Response​

{
"success": true,
"message": "Asset version unarchived successfully",
"assetId": "my-asset",
"assetVersionId": "v-abc123",
"operation": "unarchive",
"timestamp": "2026-03-15T10:30:00Z"
}

Revert to an asset version​

Reverts the asset to the state captured in a specific version.

POST /database/{databaseId}/assets/{assetId}/revertAssetVersion/{assetVersionId}

Path parameters​

ParameterTypeRequiredDescription
databaseIdstringYesDatabase identifier
assetIdstringYesAsset identifier
assetVersionIdstringYesVersion identifier to revert to

Request body​

FieldTypeRequiredDescription
commentstringYesComment for the new version created by the revert (1-256 characters).
revertMetadatabooleanNoWhen true, also revert the asset's metadata and attributes. Defaults to false.

Request body example​

{
"comment": "Reverting to floor plan revision 2",
"revertMetadata": false
}

Response​

{
"success": true,
"message": "Asset version reverted successfully",
"assetId": "my-asset",
"assetVersionId": "v-abc123",
"operation": "revert",
"timestamp": "2026-03-15T10:30:00Z"
}

Error responses​

StatusDescription
400Invalid parameters or version not found
403Not authorized
500Internal server error

  • Assets API -- Manage the assets that versions belong to
  • Files API -- Manage files within asset versions
  • Subscriptions API -- Subscribe to asset version change notifications
  • Workflows API -- Execute workflows that process assets and create outputs