WebsiteShareCreateRequest website.share-create-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- connect
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/website/share-create-request.v1.json
website.share-create-request@1: the body of website.share.create (POST /api/v1/shares). The caller names one DNS label, the protocol, the local target and the policy; the project scope comes from the token, never from this body. Connect returns only website.share@1; CON-5 defines a separate authenticated exchange for the one-time tunnel token.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
name | string | yes | The requested single label under openvibe.website. A taken or reserved label is refused; the UI may suggest name-2 rather than changing it silently. |
|
protocol | enum | yes |
| |
local_target | string | yes | The local port the Link exposes, e.g. 127.0.0.1:3000; never an arbitrary internet host. |
|
policy | any | yes | The policy to enforce. An id binds an existing owner-checked policy; without one, Connect creates it. Server-owned fields are refused in this caller body. Credential and link secrets are configured separately. | |
node_id | string | Optional: bind the share to this Link principal now. Omit to bind it when the first tunnel connects. |
| |
region | string | Optional preferred edge region; placement may ignore it when capacity or policy requires. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: agents-portal
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Valid: existing-policy-id
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"id": "pol_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
"mode": "signin"
}
}Valid: max-label
{
"name": "a-------------------------------------------------------------z",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Valid: one-char
{
"name": "a",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Valid: two-char
{
"name": "ab",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Rejected: leading-hyphen
{
"name": "-ab",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Rejected: missing-policy
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000"
}Rejected: policy-created-at
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
},
"created_at": "2026-10-29T08:00:00.000Z"
}
}Rejected: policy-owner
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
},
"owner": {
"type": "user",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A6"
}
}
}Rejected: policy-password-set
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
},
"password_set": false
}
}Rejected: policy-project-id
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
},
"project_id": null
}
}Rejected: policy-updated-at
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
},
"updated_at": "2026-10-29T08:00:00.000Z"
}
}Rejected: policy-version
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
},
"version": 1
}
}Rejected: project-in-body
{
"name": "agents-alice",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"policy": {
"mode": "signin"
},
"project_id": "prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
}Rejected: too-long
{
"name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Rejected: trailing-hyphen
{
"name": "ab-",
"protocol": "http",
"local_target": "127.0.0.1:3000",
"node_id": "lnk_01J8Z3Q4R5S6T7V8W9X0Y1Z2A5",
"policy": {
"mode": "signin",
"allowed_projects": [
"prj_01J8Z3Q4R5S6T7V8W9X0Y1Z2A7"
],
"rate_limits": {
"per_ip_per_minute": 120
}
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('website.share-create-request@1', value); // { valid, errors: [{ path, message }] }