POST /v1/hosting-plans
POST/v1/hosting-plans
Create a hosting plan
Datenmodell
Diese Operation arbeitet auf der Entität hosting_plan (hosting_plan). Alle 16 Felder — Typ, Validierung, Pflichtangabe, Beziehungen — stehen in der Schema-Referenz.
- Pflichtfelder:
name,diskQuotaGb,bandwidthQuotaGbMonth,maxEmailAccounts,maxDatabases,maxFtpUsers,maxSubdomains,phpVersions,defaultPhpVersion,phpMode,features,monthlyPriceCents - Server-verwaltet:
_id,schema,schemaVersion,tenantId,version,createdAt,updatedAt,createdBy,updatedBy,deletedAt,deletedBy— diese Felder vergibt die Plattform; im Request werden sie verworfen.
Request Body
| Name | Typ | Beschreibung |
|---|---|---|
nameerforderlich | string | |
description | string | |
diskQuotaGberforderlich | integer | |
bandwidthQuotaGbMontherforderlich | integer | |
maxEmailAccountserforderlich | integer | |
maxDatabaseserforderlich | integer | |
maxFtpUserserforderlich | integer | |
maxSubdomainserforderlich | integer | |
phpVersions | string[] | |
defaultPhpVersion | string | |
phpMode | string | |
priceCents | integer | |
diskOveragePerGbCents | integer | |
preferredServerType | string | |
isActive | boolean |
Beispiel
curl -X POST https://api.codemeta-os.de/v1/hosting-plans \
-H "X-Tenant-Id: $TENANT" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"name": "string",
"description": "string",
"diskQuotaGb": 0,
"bandwidthQuotaGbMonth": 0,
"maxEmailAccounts": 0,
"maxDatabases": 0,
"maxFtpUsers": 0,
"maxSubdomains": 0,
"phpVersions": [],
"defaultPhpVersion": "string",
"phpMode": "string",
"priceCents": 0,
"diskOveragePerGbCents": 0,
"preferredServerType": "any",
"isActive": true
}'const result = await cm.hosting-plans.post({
"name": "string",
"description": "string",
"diskQuotaGb": 0,
"bandwidthQuotaGbMonth": 0,
"maxEmailAccounts": 0,
"maxDatabases": 0,
"maxFtpUsers": 0,
"maxSubdomains": 0,
"phpVersions": [],
"defaultPhpVersion": "string",
"phpMode": "string",
"priceCents": 0,
"diskOveragePerGbCents": 0,
"preferredServerType": "any",
"isActive": true
});Antwortcodes
| HTTP | Bedeutung |
|---|---|
201 |
Default Response |