HostDomainManageRequest host.domain-manage-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/domain-manage-request.v1.json

host.domain-manage-request@1: bodies of host.domain.manage on OpenVibe.Host (a maintainer or above of the project). POST /api/v1/sites/:id/domains { hostname } adds a custom domain, pending until its TXT record is verified: a fully qualified host name, lowercased (422 domain.invalid_hostname; 422 domain.reserved for any OpenVibe domain; 403 domain.sandbox in sandbox projects; 429 quota.custom_domains; 409 domain.exists, domain.taken). GET /api/v1/sites/:id/domains, POST /api/v1/domains/:id/verify (checks the TXT record now) and DELETE /api/v1/domains/:id (409 domain.default: the default domain goes only with the site) 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: add
{
  "hostname": "www.harbourradio.example"
}
Valid: verify
{}
Rejected: no-hostname
{
  "domain": "www.harbourradio.example"
}

Validate

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