HostSiteManageRequest host.site-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/site-manage-request.v1.json
host.site-manage-request@1: bodies of host.site.manage on OpenVibe.Host (judged by the acting principal's project role too; a sandbox token is refused on production projects). POST /api/v1/projects { name, environment?, network_project_id? } creates a project owned by the person named with X-OV-Subject (403 project.owner_must_be_user; 422 project.invalid_name over 80 characters, project.invalid_environment; 429 quota.projects; 409 project.network_project_taken). PUT /api/v1/projects/:id/quota { storage_bytes?, deploys_per_day?, max_files?, max_file_bytes?, sites?, custom_domains? } (a Network staff user: 403 auth.staff_only; fields left out keep their value). PUT /api/v1/projects/:id/members/:principal { role } (the owner: 422 member.invalid_role, 409 member.owner_fixed). POST /api/v1/projects/:id/sites { name } (a maintainer; lowercased and trimmed, one DNS label of 3–40 characters: 422 site.invalid_name, site.name_reserved; 409 site.name_taken, site.name_held; 429 quota.sites). POST /api/v1/projects/:id/takedown and /sites/:id/takedown { reason } (staff: stop serving, keep the content; 409 takedown.exists); DELETE on those { note? } lifts it. GET /api/v1/projects, /projects/:id, /projects/:id/quota, /projects/:id/sites and /sites/:id, and DELETE /api/v1/projects/:id, /projects/:id/members/:principal, /sites/:id and /deploys/:id take no body (deleting refuses taken-down content for non-staff: 409 site.taken_down; an active deploy: 409 deploy.active).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: lift
{
"note": "Page removed by the owner"
}Valid: member
{
"role": "deployer"
}Valid: project
{
"name": "Harbour Radio",
"environment": "production"
}Valid: quota
{
"storage_bytes": 2147483648,
"custom_domains": null
}Valid: read
{}Valid: site
{
"name": "harbour-radio"
}Valid: takedown
{
"reason": "Phishing page reported by two users"
}Rejected: wrong-types
{
"name": 42,
"role": "admin",
"reason": "",
"storage_bytes": -1,
"note": 5
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('host.site-manage-request@1', value); // { valid, errors: [{ path, message }] }