HostDeployCreateResult host.deploy-create-result@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-result.v1.json

host.deploy-create-result@1: answers of host.deploy.create on OpenVibe.Host. GET /api/v1/sites/:id/deploys?limit= → { active_deploy_id, deploys, activations } (newest first; the last 20 pointer switches). POST /api/v1/sites/:id/deploys → 201 { deploy, activated, url } (the ready deploy with its validation log; activated when activate=1 switched the site to it). GET /api/v1/deploys/:id → { deploy } with its files. GET /api/v1/deploys/:id/log → { deploy_id, state, log }. POST /api/v1/deploys/:id/activate and /sites/:id/rollback → { active_deploy_id, previous_deploy_id, changed } (changed false when it was already active). Emits host.deploy.created|activated|failed.

Fields

This schema has no named fields.

Examples

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

Valid: list
{
  "active_deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
  "deploys": [
    {
      "id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
      "site_id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
      "project_id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
      "state": "ready",
      "active": true,
      "source": "archive",
      "file_count": 37,
      "total_bytes": 482113,
      "new_bytes": 20411,
      "manifest_sha256": "a3f1c9e0b4d2e6f8a1c3e5f7091b2d4f6a8c0e2f4a6b8d0f2e4c6a8b0d2f4e6a",
      "failure_code": null,
      "created_by": "app:app_01JAD7A8B9C0D1E2F3G4H5J6K7",
      "created_at": "2026-09-24T09:40:12.000Z"
    }
  ],
  "activations": [
    {
      "deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
      "previous_deploy_id": "dpl_01JAD3D4E5F6G7H8J9K0M1N2P3",
      "kind": "activate",
      "actor": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "at": "2026-09-24T09:40:12.000Z"
    }
  ]
}
Valid: log
{
  "deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
  "state": "ready",
  "log": [
    {
      "level": "info",
      "message": "ready; not active until you activate it",
      "at": "2026-09-24T09:40:12.000Z"
    }
  ]
}
Valid: one
{
  "deploy": {
    "id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
    "site_id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
    "project_id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
    "state": "ready",
    "active": true,
    "source": "archive",
    "file_count": 37,
    "total_bytes": 482113,
    "new_bytes": 20411,
    "manifest_sha256": "a3f1c9e0b4d2e6f8a1c3e5f7091b2d4f6a8c0e2f4a6b8d0f2e4c6a8b0d2f4e6a",
    "failure_code": null,
    "created_by": "app:app_01JAD7A8B9C0D1E2F3G4H5J6K7",
    "created_at": "2026-09-24T09:40:12.000Z",
    "files": [
      {
        "path": "index.html",
        "sha256": "a3f1c9e0b4d2e6f8a1c3e5f7091b2d4f6a8c0e2f4a6b8d0f2e4c6a8b0d2f4e6a",
        "size": 5120,
        "content_type": "text/html; charset=utf-8"
      }
    ]
  }
}
Valid: switched
{
  "active_deploy_id": "dpl_01JAD3D4E5F6G7H8J9K0M1N2P3",
  "previous_deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
  "changed": true
}
Valid: uploaded
{
  "deploy": {
    "id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
    "site_id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
    "project_id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
    "state": "ready",
    "active": true,
    "source": "archive",
    "file_count": 37,
    "total_bytes": 482113,
    "new_bytes": 20411,
    "manifest_sha256": "a3f1c9e0b4d2e6f8a1c3e5f7091b2d4f6a8c0e2f4a6b8d0f2e4c6a8b0d2f4e6a",
    "failure_code": null,
    "created_by": "app:app_01JAD7A8B9C0D1E2F3G4H5J6K7",
    "created_at": "2026-09-24T09:40:12.000Z",
    "log": [
      {
        "level": "info",
        "message": "validated 37 files, 470.8 KiB (paths, file types, sizes)",
        "at": "2026-09-24T09:40:12.000Z"
      },
      {
        "level": "info",
        "message": "activated: the site now serves this deploy",
        "at": "2026-09-24T09:40:12.000Z"
      }
    ]
  },
  "activated": true,
  "url": "https://harbour-radio.openvibe.host"
}
Rejected: bad-activation-kind
{
  "active_deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
  "deploys": [],
  "activations": [
    {
      "deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
      "previous_deploy_id": null,
      "kind": "deploy",
      "actor": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "at": "2026-09-24T09:40:12.000Z"
    }
  ]
}

Validate

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