Executes a batch of asset operations (upsert, delete, restore) atomically. All operations succeed or all are rolled back.
Array of batch operations (max 1000).
Optionalsignal: AbortSignalRetrieves multiple assets by ID in a single request.
Array of asset IDs (max 1000).
Optionalsignal: AbortSignalCreates an upload session for a new attachment. The actual file bytes are uploaded out-of-band to ApiCreateUploadSessionResponse.uploadUrl; use uploadAssetAttachmentFile for the canonical chunked-upload flow. The attachment row is materialized server-side when the blob lands.
Optionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalSoft-deletes an attachment.
Optionalsignal: AbortSignalSoft-deletes a category. Inserts a new asset_category_versions row with
is_deleted=true; the previous version is retained as an audit trail.
Optionalsignal: AbortSignalSoft-deletes a type. Inserts a new asset_type_versions row with
is_deleted=true; the previous version is retained as an audit trail.
Optionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalDownloads an attachment's blob as a Response. The caller decides
whether to consume it as text, ArrayBuffer, or Blob.
Optionalsignal: AbortSignalPolls the in-memory upload-session cache for an attachment that's being uploaded.
Optionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalReturns the customer's asset-type catalog: categories nested with their latest non-deleted types and full metadata schemas inline. One round-trip is enough to populate a picker dropdown and render any per-type metadata form.
Optionalsignal: AbortSignalReturns the Twinfinity meta-schema document — the JSON Schema describing valid asset-type metadata schemas. The bytes the backend itself validates against, served verbatim. Power-user tools (Monaco-backed JSON editors, schema-aware tooling) fetch this at runtime so their in-editor diagnostics line up with what the server will accept, decoupled from the FE bundle's build time.
Optionalsignal: AbortSignalReturns the caller's named, customer-scoped capabilities against the
Twin service (e.g. ViewAssetTypes, EditAssetTypes). The admin app
uses this to enable or disable buttons instead of letting the user
click through to a 403.
No client-side cache — every call hits the wire. Underlying scope grants don't shift within a session, so callers are expected to memoise the result themselves (e.g. via React Query / a once-on-mount fetch) rather than calling this on every render.
Throws TwinUnauthenticatedError on 401 (no valid auth context;
caller should redirect to login). Returns an empty permissions array
on 403 (authenticated but no Twin-service capabilities). Unknown
capability strings should be ignored — adding a new capability is a
non-breaking change.
Optionalsignal: AbortSignalOptionaloffset: numberOptionallimit: numberOptionalsignal: AbortSignalTwin ID string, or {id, version} to fetch a specific version.
Optionalsignal: AbortSignalReturns content for the latest twin version.
Optionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalOptionaloffset: numberOptionallimit: numberOptionalsignal: AbortSignalFetches all twins by auto-paginating through listTwins. Caps at 1000 pages.
OptionalrelatedTo: stringFilter twins by container ID.
Optionalsignal: AbortSignalLists attachments for a single asset.
Optionaloptions: { includeDeleted?: boolean; limit?: number; offset?: number; page?: string }Optionalsignal: AbortSignalOptionaloptions: { includeDeleted?: boolean; limit?: number; page?: string }Optionalsignal: AbortSignalReturns every version of a single asset category, newest first. Mirrors
listAssetTypeVersions and twin.get_twin_versions.
Optionaloptions: { includeDeleted?: boolean; limit?: number; page?: string }Optionalsignal: AbortSignalOptionaloffset: numberOptionallimit: numberOptionaloptions: { includeDeleted?: boolean }Optionalsignal: AbortSignalOptionaloptions: { includeDeleted?: boolean; limit?: number; page?: string }Optionalsignal: AbortSignalReturns every version of a single asset type, newest first. Mirrors
twin.get_twin_versions.
Optionaloptions: { includeDeleted?: boolean; limit?: number; page?: string }Optionalsignal: AbortSignalOptionaloptions: TwinFileListOptionsOptionalsignal: AbortSignalOptionaloptions: TwinFileVersionListOptionsOptionalsignal: AbortSignalOptionalrelatedTo: stringFilter twins by container ID.
Optionalpage: stringOptionallimit: numberOptionalsignal: AbortSignalOptionaloptions: { includeDeleted?: boolean; limit?: number; page: undefined | string }Optionalsignal: AbortSignalDownloads and deserializes geometry info (t8gi) using default types. When no version is specified, searches versions newest-first for one containing t8gi content.
Twin ID string, or {id, version} to load a specific version.
Optionalsignal: AbortSignalDownloads and deserializes geometry info (t8gi) using custom factory functions. When no version is specified, searches versions newest-first for one containing t8gi content.
Twin ID string, or {id, version} to load a specific version.
Optionalsignal: AbortSignalDownloads and deserializes the T8 client model (t8cm + t8cm-ext) using default types. When no version is specified, searches versions newest-first for one containing t8cm content.
Twin ID string, or {id, version} to load a specific version.
Optionalsignal: AbortSignalDownloads and deserializes the T8 client model using custom factory functions for domain-specific types. When no version is specified, searches versions newest-first for one containing t8cm content.
Twin ID string, or {id, version} to load a specific version.
Optionalsignal: AbortSignalDownloads and deserializes both the client model (t8cm) and geometry (t8gi/t8gd) into a combined result. When no version is specified, searches versions newest-first for one containing both t8cm and t8gi content.
Twin ID string, or {id, version} to load a specific version.
Optionalsignal: AbortSignalUpdates an attachment's description / soft-delete flag. documentId
is immutable — rebinding is rejected.
Optionalsignal: AbortSignalUpserts an asset category. Provide an empty/missing etag for first writes and the existing etag to update.
Optionalsignal: AbortSignalUpserts an asset type. The metadata schema is validated against the
Twinfinity meta-schema at the API boundary; invalid schemas surface as
a 400 with cause: MetadataSchemaInvalid.
Optionalsignal: AbortSignalRestores a soft-deleted attachment.
Optionalsignal: AbortSignalRestores a soft-deleted category. Inserts a new asset_category_versions
row with is_deleted=false; mirrors twin restore.
Optionalsignal: AbortSignalRestores a soft-deleted type. Inserts a new asset_type_versions row with
is_deleted=false; mirrors twin restore.
Optionalsignal: AbortSignalOptionalsignal: AbortSignalOptionalsignal: AbortSignalAlias for createOrUpdateTwin.
Optionalsignal: AbortSignalUploads a File / Blob to an existing upload session in one or more
chunks, then resolves the upload token so the caller can poll
getAssetAttachmentUploadStatus.
Optionalsignal: AbortSignal
Rooted twins base URL — typically
<host>/sites/<container>/_ps/twins. Exposed so callers that want to build content URLs in the same auth scope as the metadata calls can derive them from here. The bare<host>/_ps/twins/...variant is not necessarily an authorized route on all deployments.