Upload version
Version upload is a two-step process: request an upload URL, then confirm the upload after the file is stored.Step 1: Get upload URL
If the source hash matches an existing version (and
force is false), the API returns the existing version info instead of generating an upload URL. This prevents duplicate uploads.
Returns signed upload URLs for the main package and lockfile.
Authentication: Entity access + publisher role required.
Step 2: Confirm upload
Creates the version record in the database. If
set_as_active is true, this version becomes the active version.
Authentication: Entity access + publisher role required.
Push protection
A push may only extend the current tip: the most recently created version. Both upload endpoints validatebase_version_id against it, and reject the push with 409 when the value is stale, or when it’s omitted while the entity already has versions:
latest_version is the current tip to reconcile against before retrying.
- The first push to an entity needs no
base_version_id. forcedoes not bypass this check; it only bypasses source-hash deduplication.- On confirm, deduplication runs first, so re-confirming a version you already published returns
200with the existing version rather than409.
Download version
- Entity publishers
- Users the entity is shared with
- Organization members if the entity is published to the org store
- Any authenticated user if the entity is in a public store
Get active version
Set active version
The active version is what gets installed by default from stores or shares, and what gets deployed unless a specific version is specified.
Authentication: Entity access + publisher role required.
Delete version
Version identifiers
Versions use a timestamp-based format:YYYY.MM.DD-HHMMSS (e.g., 2024.06.10-153042). This provides chronological ordering without semantic versioning complexity.
The source_hash field enables deduplication — if you push the same source code twice, the platform recognizes the duplicate and returns the existing version rather than creating a new one.
