Create webspace
POST/v1/webspaces
Create a new webspace in the active tenant.
Modèle de données
Cette opération porte sur l'entité webspace (webspace). Les 32 champs (type, validation, caractère obligatoire, relations) figurent dans la référence du schéma.
-
Champs obligatoires :
domainName,dnsMode -
Gérés par le serveur :
_id,schema,schemaVersion,tenantId,version,createdAt,updatedAt,createdBy,updatedBy,deletedAt,deletedBy,webspaceNumber,pleskDomainId,pleskClientLogin,pleskServerId,dnsMode,status. La plateforme attribue ces champs ; ils sont ignorés dans la requête.
Corps de la requête
| Nom | Type | Description |
|---|---|---|
domainNameobligatoire | string | |
hostingType | string | |
dnsModeobligatoire | string | |
pleskServerId | string | |
preferredRegion | string | |
plan | string | |
partyIdobligatoire | string | |
assignedToId | string | |
phpVersion | string | |
phpMode | string | |
documentRoot | string | |
diskQuotaGb | integer | |
billingEnabled | boolean | |
billingPriceCents | integer | |
tags | string[] |
Exemple
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": []
});Codes de réponse
| HTTP | Signification |
|---|---|
202 |
Default Response |