HostSiteManageResult host.site-manage-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/site-manage-result.v1.json

host.site-manage-result@1: answers of host.site.manage on OpenVibe.Host. GET /api/v1/projects → { projects } (the caller's projects with their role). POST /api/v1/projects → 201 { project } (with quota and usage). GET /api/v1/projects/:id → { project, sites, members }. GET and PUT /api/v1/projects/:id/quota → { quota, usage }. PUT and DELETE /api/v1/projects/:id/members/:principal → { members }. GET /api/v1/projects/:id/sites → { sites }. POST /api/v1/projects/:id/sites → 201 { site }. GET /api/v1/sites/:id → { site, domains }. DELETE /api/v1/projects/:id and /sites/:id → { deleted: true } (serving stops at once; the objects are removed). DELETE /api/v1/deploys/:id → { deleted: true, objects_removed }. POST …/takedown → 201 { takedown }; DELETE …/takedown → { lifted: true }.

Fields

This schema has no named fields.

Examples

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

Valid: created
{
  "project": {
    "id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
    "name": "Harbour Radio",
    "environment": "production",
    "network_project_id": null,
    "owner": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "role": "owner",
    "created_at": "2026-09-24T08:15:00.000Z",
    "takedown": null,
    "quota": {
      "storage_bytes": 1073741824,
      "deploys_per_day": 50,
      "max_files": 5000,
      "max_file_bytes": 26214400,
      "sites": 5,
      "custom_domains": 5
    },
    "usage": {
      "storage_bytes": 482113,
      "objects": 37,
      "deploys_last_24h": 3,
      "sites": 1,
      "custom_domains": 1
    }
  }
}
Valid: deleted
{
  "deleted": true
}
Valid: deploy-deleted
{
  "deleted": true,
  "objects_removed": 4
}
Valid: lifted
{
  "lifted": true
}
Valid: members
{
  "members": [
    {
      "principal": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "role": "owner",
      "added_at": "2026-09-24T08:15:00.000Z"
    }
  ]
}
Valid: project
{
  "project": {
    "id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
    "name": "Harbour Radio",
    "environment": "production",
    "network_project_id": null,
    "owner": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "role": "owner",
    "created_at": "2026-09-24T08:15:00.000Z",
    "takedown": null,
    "quota": {
      "storage_bytes": 1073741824,
      "deploys_per_day": 50,
      "max_files": 5000,
      "max_file_bytes": 26214400,
      "sites": 5,
      "custom_domains": 5
    },
    "usage": {
      "storage_bytes": 482113,
      "objects": 37,
      "deploys_last_24h": 3,
      "sites": 1,
      "custom_domains": 1
    }
  },
  "sites": [
    {
      "id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
      "project_id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
      "name": "harbour-radio",
      "hostname": "harbour-radio.openvibe.host",
      "url": "https://harbour-radio.openvibe.host",
      "active_deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
      "takedown": null,
      "created_at": "2026-09-24T08:15:00.000Z",
      "updated_at": "2026-09-24T09:40:12.000Z"
    }
  ],
  "members": [
    {
      "principal": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "role": "owner",
      "added_at": "2026-09-24T08:15:00.000Z"
    },
    {
      "principal": "app:app_01JAD7A8B9C0D1E2F3G4H5J6K7",
      "role": "deployer",
      "added_at": "2026-09-24T08:15:00.000Z"
    }
  ]
}
Valid: projects
{
  "projects": [
    {
      "id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
      "name": "Harbour Radio",
      "environment": "production",
      "network_project_id": null,
      "owner": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "role": "owner",
      "created_at": "2026-09-24T08:15:00.000Z",
      "takedown": null
    }
  ]
}
Valid: quota
{
  "quota": {
    "storage_bytes": 1073741824,
    "deploys_per_day": 50,
    "max_files": 5000,
    "max_file_bytes": 26214400,
    "sites": 5,
    "custom_domains": 5
  },
  "usage": {
    "storage_bytes": 482113,
    "objects": 37,
    "deploys_last_24h": 3,
    "sites": 1,
    "custom_domains": 1
  }
}
Valid: site
{
  "site": {
    "id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
    "project_id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
    "name": "harbour-radio",
    "hostname": "harbour-radio.openvibe.host",
    "url": "https://harbour-radio.openvibe.host",
    "active_deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
    "takedown": null,
    "created_at": "2026-09-24T08:15:00.000Z",
    "updated_at": "2026-09-24T09:40:12.000Z"
  },
  "domains": [
    {
      "id": "dom_01JAD5D6E7F8G9H0J1K2M3N4P5",
      "site_id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
      "hostname": "harbour-radio.openvibe.host",
      "kind": "default",
      "status": "verified",
      "served": true,
      "verified_at": "2026-09-24T08:15:00.000Z",
      "last_checked_at": null,
      "last_error": null
    },
    {
      "id": "dom_01JAD6D6E7F8G9H0J1K2M3N4P5",
      "site_id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
      "hostname": "www.harbourradio.example",
      "kind": "custom",
      "status": "pending",
      "served": false,
      "verified_at": null,
      "last_checked_at": "2026-09-24T09:40:12.000Z",
      "last_error": "no TXT record at _openvibe-host.www.harbourradio.example yet",
      "instructions": {
        "verification": {
          "type": "TXT",
          "name": "_openvibe-host.www.harbourradio.example",
          "value": "openvibe-host-verification=5f0c2a9e1b7d4c3a8e6f0b2d4c6a8e0f1a3c5e7b",
          "note": "keep this record: Host re-checks it daily"
        },
        "routing": [
          {
            "type": "CNAME",
            "name": "www.harbourradio.example",
            "value": "harbour-radio.openvibe.host",
            "note": "for a subdomain such as www.example.org"
          }
        ],
        "tls": "after verification an operator issues the certificate (Let's Encrypt); HTTPS starts working once it is installed"
      }
    }
  ]
}
Valid: sites
{
  "sites": [
    {
      "id": "site_01JAD2S3T4V5W6X7Y8Z9A0B1C2",
      "project_id": "prj_01JAD1P2R3J4K5M6N7P8Q9R0S1",
      "name": "harbour-radio",
      "hostname": "harbour-radio.openvibe.host",
      "url": "https://harbour-radio.openvibe.host",
      "active_deploy_id": "dpl_01JAD4D4E5F6G7H8J9K0M1N2P3",
      "takedown": null,
      "created_at": "2026-09-24T08:15:00.000Z",
      "updated_at": "2026-09-24T09:40:12.000Z"
    }
  ]
}
Valid: takedown
{
  "takedown": {
    "scope": "site",
    "reason": "Phishing page reported by two users",
    "since": "2026-09-24T09:40:12.000Z"
  }
}
Rejected: deleted-false
{
  "deleted": false
}

Validate

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