Skip to content

The version sync endpoint

Drop archives on the disk and have the panel register them for you.

1 min read

If your build process writes archives straight onto the panel’s storage disk, this endpoint saves you from creating each version record by hand.

POST /api/v1/products/{product-slug}/versions/sync

Rate limited to 20 requests per minute.

What it does#

It scans the product’s folder on the releases disk and, for every .zip it finds:

  1. Derives the version number from the filename.
  2. Computes the SHA-256 hash.
  3. Creates a version record, or updates an existing one whose file or hash changed.
  4. Leaves an existing release date alone — a re-sync never rewrites history.

Response#

Files are reported in four buckets, so a sync tells you exactly what changed:

{
  "created":   [ { "version": "1.4.2", "file_path": "my-plugin/my-plugin-1.4.2.zip" } ],
  "updated":   [],
  "unchanged": [ { "version": "1.4.1", "file_path": "my-plugin/my-plugin-1.4.1.zip" } ],
  "skipped":   [ { "file_path": "my-plugin/latest.zip", "reason": "version_not_detected" } ]
}

Naming your files#

The version has to be readable from the filename. Include it plainly:

  • my-plugin-1.4.2.zip — detected
  • my-plugin-v1.4.2.zip — detected
  • my-plugin-latest.zip — skipped, with reason version_not_detected

A skipped file is reported, not silently dropped, so a mis-named build shows up in your sync output rather than going missing.

Files in the folder#

Only .zip files are considered. Anything else in the folder is ignored entirely.