HostDeployCreateRequest host.deploy-create-request@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
host
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/host/deploy-create-request.v1.json

host.deploy-create-request@1: bodies of host.deploy.create on OpenVibe.Host (a deployer or above of the project; an app principal added as deployer can deploy from CI). POST /api/v1/sites/:id/deploys uploads a deploy: the raw body is a tar or tar.gz archive (Content-Type application/gzip, application/x-gzip, application/x-tar or application/octet-stream), or multipart/form-data with archive=<one archive> or files=<file>… (each part's filename is its path); optional fields activate=1, root=<subdirectory to deploy> and strip=folder (removes a shared first segment) also work as query parameters. It is validated (path traversal, links, special and hidden files, server-side code, file types, sizes and quotas) and never executed; a refusal is a problem whose extra carries the failed deploy_id and its log (413 upload.too_large, quota.storage; 422 validation codes; 429 quota.deploys_per_day; 403 site.taken_down; 503 upload.busy; 507 storage.host_full). POST /api/v1/deploys/:id/activate { expected_active? } and POST /api/v1/sites/:id/rollback { deploy_id?, expected_active? } switch the site's pointer in one step (rollback without deploy_id goes to the deploy active before; 409 deploy.not_ready, site.active_changed when expected_active is stale, deploy.no_previous). GET /api/v1/sites/:id/deploys, /deploys/:id and /deploys/:id/log take no body.

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: activate
{
  "expected_active": "dpl_01JAD3D4E5F6G7H8J9K0M1N2P3"
}
Valid: rollback-previous
{}
Valid: rollback
{
  "deploy_id": "dpl_01JAD3D4E5F6G7H8J9K0M1N2P3",
  "expected_active": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3"
}
Rejected: wrong-types
{
  "deploy_id": 42,
  "expected_active": 7
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('host.deploy-create-request@1', value);   // { valid, errors: [{ path, message }] }