Hosting

Overview

Host static sites with versioned releases: upload files, finalize, promote, and rollback. Public traffic is served under /hosting/s/{siteId}/….

API

{pe} = /projects/{projectId}/environments/{environmentId}.

MethodPathNotes
GET/hosting/healthHealth
GET/hosting/s/{siteId}/Public serve
GET/hosting/s/{siteId}/{*path}Public serve
GET/POST/hosting{pe}/sitesAPI key or owner JWT
GET/PATCH/hosting{pe}/sites/{siteId}API key or owner JWT
GET/POST/hosting{pe}/sites/{siteId}/releasesCreate release
PUT/hosting{pe}/sites/{siteId}/releases/{releaseId}/files/{*path}Upload file
POST/hosting{pe}/sites/{siteId}/releases/{releaseId}/files:batchBatch upload
POST/hosting{pe}/sites/{siteId}/releases/{releaseId}:finalizeFinalize
POST/hosting{pe}/sites/{siteId}/releases/{releaseId}:promotePromote
POST/hosting{pe}/sites/{siteId}/releases/{releaseId}:rollbackRollback

Clients

PackageRuntime
@vijihub/hostingserver

Implementation

  1. Enable Hosting on the environment.
  2. Create a site, create a release, upload assets, finalize, then promote.
  3. Point users at /hosting/s/{siteId}/… on the Gateway (or your edge in front of it).
  4. Use rollback to restore a previous promoted release.

Constraints

  • Management APIs require API key or owner JWT.
  • Public serve routes are anonymous — only publish content you intend to expose.
  • Large uploads should use batch endpoints; finalize before promote.