Skip to main content

Overview

The VersionResource provides methods for managing versions within Speckle models. Access it via client.version after authenticating your SpeckleClient. Versions represent specific states or iterations of your data within a model. Each version references a committed object and includes metadata like author, timestamp, and a descriptive message.

Methods

get()

Get a single version by ID.
Parameters:
str
required
The ID of the version to retrieve
str
required
The ID of the project containing the version
Returns:
Version
The version object
Example:
See Version for property details.

get_versions()

Get all versions in a model with pagination support.
Parameters:
str
required
The ID of the model
str
required
The ID of the project
int
default:"25"
Maximum number of versions to return
str
default:"None"
Cursor for pagination
ModelVersionsFilter
default:"None"
Filter criteria
Returns:
ResourceCollection[Version]
Collection with items, totalCount, and cursor
Example:
With Pagination:
With Filtering:
The ResourceCollection object includes: - items - List of Version objects - totalCount - Total number of versions (across all pages) - cursor - Pagination cursor for next page (or None if no more pages)

create()

Create a new version in a model.
Parameters:
CreateVersionInput
required
Version creation parameters. See CreateVersionInput
Returns:
Version
The newly created version
Example:
CreateVersionInput Fields:
  • project_id (str, required) - The project ID
  • model_id (str, required) - The model ID
  • object_id (str, required) - The ID of the object to reference (from operations.send())
  • message (str, optional) - Commit message describing this version
  • source_application (str, optional) - Name of the source application
Complete Workflow Example:

update()

Update an existing version’s properties.
Parameters:
UpdateVersionInput
required
Version update parameters. See UpdateVersionInput
Returns:
Version
The updated version
Example:
See UpdateVersionInput for all available fields.
You can only update the message of a version. The referenced object cannot be changed after creation.

move_to_model()

Move versions from one model to another within the same project.
Parameters:
MoveVersionsInput
required
Move parameters. See MoveVersionsInput
Returns:
str
The target model ID
Example:
MoveVersionsInput Fields:
  • project_id (str, required) - The project ID
  • version_ids (List[str], required) - List of version IDs to move
  • target_model_id (str, required) - The destination model ID
Both the source and target models must be in the same project. This operation cannot be undone.

delete()

Delete one or more versions permanently.
Parameters:
DeleteVersionsInput
required
Deletion parameters. See DeleteVersionsInput
Returns:
bool
True if deletion was successful
Example:
DeleteVersionsInput Fields:
  • project_id (str, required) - The project ID
  • version_ids (List[str], required) - List of version IDs to delete
This operation is irreversible! The versions will be permanently deleted, though the referenced objects may still exist in the project.

received()

Mark a version as received (useful for tracking which versions have been processed).
Parameters:
MarkReceivedVersionInput
required
Mark received parameters
Returns:
bool
True if successfully marked
Example:
MarkReceivedVersionInput Fields:
  • project_id (str, required) - The project ID
  • version_id (str, required) - The version ID to mark
  • message (str, optional) - Optional message
  • source_application (str, optional) - Application that received the version
This method is useful for automation workflows where you want to track which versions have been processed by your scripts or applications.

Types

Version

Represents a version within a Speckle model.
str
Version ID
str
Commit message describing this version
str
The ID of the committed object
datetime
Creation timestamp
LimitedUser
User who created the version. See LimitedUser
str
Application used to create the version
str
URL to preview image

Input Types

CreateVersionInput

Used with create(). Fields:
  • object_id (str) - ID of the object (from operations.send())
  • model_id (str) - Model ID
  • project_id (str) - Project ID
  • message (str, optional) - Version message/description
  • source_application (str, optional) - Source application name. Default: "py"
  • total_children_count (int, optional) - Total number of child objects
  • parents (List[str], optional) - Parent version IDs

UpdateVersionInput

Used with update(). Fields:
  • version_id (str) - Version ID
  • project_id (str) - Project ID
  • message (str, optional) - New version message

DeleteVersionsInput

Used with delete(). Fields:
  • version_ids (List[str]) - List of version IDs to delete
  • project_id (str) - Project ID

MoveVersionsInput

Move versions to a different model. Fields:
  • target_model_name (str) - Name of the target model
  • version_ids (List[str]) - Version IDs to move
  • project_id (str) - Project ID

Operations

Send and receive objects for versions

ModelResource

Manage models that contain versions

ServerTransport

Transport for sending/receiving data

SpeckleClient

Main client documentation
Last modified on July 18, 2026