Vhost Delete
Deletes a virtual host configuration.
Request
| Property | Value |
|---|---|
| Method | DELETE |
| URL | /api/server/settings/vhosts/{vhostId} |
| Content-Type | application/json |
| Authentication | Bearer Token |
Request
curl -X DELETE "{BASE_URL}/api/server/settings/vhosts/{vhostId}" \
-H "Authorization: Bearer YOUR_TOKEN"
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
vhostId | integer | Yes | Unique identifier of the VHost |
Request With Parameters
curl -X DELETE "{BASE_URL}/api/server/settings/vhosts/{vhostId}" \
-H "Authorization: Bearer YOUR_TOKEN"
Response Body
VHost
| Parameter | Type | Description |
|---|---|---|
data.id | integer | Unique identifier of the deleted VHost |
data.attributes.host.value | string | Host binding |
data.attributes.host.editable | boolean | Indicates if the field can be modified |
data.attributes.host.lockedBy | string | Locked by environment variable (if present) |
data.attributes.port.value | integer | Port number |
data.attributes.port.editable | boolean | Indicates if the field can be modified |
data.attributes.port.lockedBy | string | Locked by environment variable (if present) |
data.attributes.protocols.value | string[] | Enabled protocols |
data.attributes.protocols.editable | boolean | Indicates if the field can be modified |
data.attributes.protocols.lockedBy | string | Locked by environment variable (if present) |
data.attributes.isSSL.value | boolean | SSL enabled |
data.attributes.isSSL.editable | boolean | Indicates if the field can be modified |
data.attributes.isSSL.lockedBy | string | Locked by environment variable (if present) |
data.attributes.certificatePath.value | string | Path to SSL certificate |
data.attributes.certificatePath.editable | boolean | Indicates if the field can be modified |
data.attributes.certificatePath.lockedBy | string | Locked by environment variable (if present) |
data.attributes.certificatePassword.value | string | SSL certificate password (masked) |
data.attributes.certificatePassword.masked | boolean | Indicates if the value is masked |
data.attributes.isControlPanel.value | boolean | Control panel endpoint |
data.attributes.isControlPanel.editable | boolean | Indicates if the field can be modified |
data.attributes.isControlPanel.lockedBy | string | Locked by environment variable (if present) |
message | string | Response status message |
Metadata
| Parameter | Type | Description |
|---|---|---|
meta.executionTime | integer | Request processing time in milliseconds |
meta.generatedAt | integer | Response generation timestamp (Unix timestamp in ms) |
Successful Response (200)
{
"data": {
"id": 3,
"attributes": {
"host": {
"editable": true,
"value": "127.0.0.1"
},
"port": {
"editable": true,
"value": 8093
},
"protocols": {
"editable": true,
"value": ["HTTP"]
},
"isSSL": {
"editable": true,
"value": true
},
"certificatePath": {
"editable": true,
"value": "/path/to/certificate.p12"
},
"certificatePassword": {
"masked": true,
"value": "p****d"
},
"isControlPanel": {
"editable": true,
"value": true
}
}
},
"meta": {
"executionTime": 6,
"generatedAt": 1764854027621
},
"message": "VHost has been removed"
}
Error Responses
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
VHost Not Found (404)
{
"message": "VHost not found"
}
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.