API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola

Create webspace

POST/v1/webspaces

Create a new webspace in the active tenant.

Modelo de datos

Esta operación trabaja sobre la entidad webspace (webspace). Los 32 campos (tipo, validación, obligatoriedad y relaciones) figuran en la referencia del esquema.

  • Campos obligatorios: domainName, dnsMode
  • Gestionados por el servidor: _id, schema, schemaVersion, tenantId, version, createdAt, updatedAt, createdBy, updatedBy, deletedAt, deletedBy, webspaceNumber, pleskDomainId, pleskClientLogin, pleskServerId, dnsMode, status. La plataforma asigna estos campos; si se envían en la solicitud, se descartan.

Cuerpo de la solicitud

NombreTipoDescripción
domainNameobligatoriostring
hostingTypestring
dnsModeobligatoriostring
pleskServerIdstring
preferredRegionstring
planstring
partyIdobligatoriostring
assignedToIdstring
phpVersionstring
phpModestring
documentRootstring
diskQuotaGbinteger
billingEnabledboolean
billingPriceCentsinteger
tagsstring[]

Ejemplo

curl -X POST https://api.codemeta-os.de/v1/webspaces \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "domainName": "string",
  "hostingType": "webspace",
  "dnsMode": "inwx",
  "pleskServerId": "string",
  "preferredRegion": "string",
  "plan": "string",
  "partyId": "string",
  "assignedToId": "string",
  "phpVersion": "8.3",
  "phpMode": "fpm",
  "documentRoot": "/httpdocs",
  "diskQuotaGb": 10,
  "billingEnabled": false,
  "billingPriceCents": 0,
  "tags": []
}'
const result = await cm.webspaces.post({
  "domainName": "string",
  "hostingType": "webspace",
  "dnsMode": "inwx",
  "pleskServerId": "string",
  "preferredRegion": "string",
  "plan": "string",
  "partyId": "string",
  "assignedToId": "string",
  "phpVersion": "8.3",
  "phpMode": "fpm",
  "documentRoot": "/httpdocs",
  "diskQuotaGb": 10,
  "billingEnabled": false,
  "billingPriceCents": 0,
  "tags": []
});

Códigos de respuesta

HTTP Significado
202 Default Response

Búsqueda