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}.
| Method | Path | Notes |
|---|---|---|
| GET | /hosting/health | Health |
| GET | /hosting/s/{siteId}/ | Public serve |
| GET | /hosting/s/{siteId}/{*path} | Public serve |
| GET/POST | /hosting{pe}/sites | API key or owner JWT |
| GET/PATCH | /hosting{pe}/sites/{siteId} | API key or owner JWT |
| GET/POST | /hosting{pe}/sites/{siteId}/releases | Create release |
| PUT | /hosting{pe}/sites/{siteId}/releases/{releaseId}/files/{*path} | Upload file |
| POST | /hosting{pe}/sites/{siteId}/releases/{releaseId}/files:batch | Batch upload |
| POST | /hosting{pe}/sites/{siteId}/releases/{releaseId}:finalize | Finalize |
| POST | /hosting{pe}/sites/{siteId}/releases/{releaseId}:promote | Promote |
| POST | /hosting{pe}/sites/{siteId}/releases/{releaseId}:rollback | Rollback |
Clients
| Package | Runtime |
|---|---|
@vijihub/hosting | server |
Implementation
- Enable Hosting on the environment.
- Create a site, create a release, upload assets, finalize, then promote.
- Point users at
/hosting/s/{siteId}/…on the Gateway (or your edge in front of it). - 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.