Vhost Update

Updates an existing virtual host configuration.

Request

Property Value
Method PUT
URL /api/server/settings/vhosts/{vhostId}
Content-Type application/json
Authentication Bearer Token

Path Parameters

Parameter Type Required Description
vhostId integer Yes Unique identifier of the VHost

Request Body

Parameter Type Required Description
host string Yes Host binding ("*" for all interfaces or specific IP)
port integer Yes Port number
protocols string[] Yes Enabled protocols
isSSL boolean No SSL enabled
certificatePath string No Path to SSL certificate (required if isSSL is true)
certificatePassword string No SSL certificate password (required if isSSL is true)
isControlPanel boolean No Control panel endpoint

Example Request

{
  "host": "127.0.0.1",
  "port": 7777,
  "protocols": ["HTTP"],
  "isSSL": false,
  "isControlPanel": true
}

Example Request (with SSL)

{
  "host": "*",
  "port": 443,
  "protocols": ["WEBSOCKETS", "HTTP"],
  "isSSL": true,
  "certificatePath": "/path/to/certificate.p12",
  "certificatePassword": "password",
  "isControlPanel": false
}

Response

Status Codes

Code Description
200 Success - VHost updated
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing token
404 Not Found - VHost does not exist
409 Conflict - Port already in use
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error

Successful Response (200)

{
  "data": {
    "id": 4,
    "attributes": {
      "host": {
        "editable": true,
        "value": "127.0.0.1"
      },
      "port": {
        "editable": true,
        "value": 7777
      },
      "protocols": {
        "editable": true,
        "value": ["HTTP"]
      },
      "isSSL": {
        "editable": true,
        "value": false
      },
      "isControlPanel": {
        "editable": true,
        "value": true
      }
    }
  },
  "meta": {
    "executionTime": 16,
    "generatedAt": 1764854556835
  },
  "message": "VHost updated successfully"
}

Response Body

VHost

Parameter Type Description
data.id integer Unique identifier of the 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)

Error Responses

VHost Not Found (404)

{
  "message": "VHost Entity not found"
}

Error Response Body

Parameter Type Description
message string Human-readable error message