Create webspace
POST/v1/webspaces
Create a new webspace in the active tenant.
Datamodel
Deze operatie werkt op de entiteit webspace (webspace). Alle 32 velden — type, validatie, verplichte velden, relaties — staan in de schemareferentie.
-
Verplichte velden:
domainName,dnsMode -
Door de server beheerd:
_id,schema,schemaVersion,tenantId,version,createdAt,updatedAt,createdBy,updatedBy,deletedAt,deletedBy,webspaceNumber,pleskDomainId,pleskClientLogin,pleskServerId,dnsMode,status— deze velden worden door het platform toegekend; in de request worden ze genegeerd.
Request body
| Naam | Type | Beschrijving |
|---|---|---|
domainNamevereist | string | |
hostingType | string | |
dnsModevereist | string | |
pleskServerId | string | |
preferredRegion | string | |
plan | string | |
partyIdvereist | string | |
assignedToId | string | |
phpVersion | string | |
phpMode | string | |
documentRoot | string | |
diskQuotaGb | integer | |
billingEnabled | boolean | |
billingPriceCents | integer | |
tags | string[] |
Voorbeeld
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": []
});Antwoordcodes
| HTTP | Betekenis |
|---|---|
202 |
Default Response |