Xentara WebSocket API Specification v2.0.3
User Manual
Server Information Command

Command

OpCodeNameDescription
0server_informationRetrieves server information.

Parameters

The parameter object outlined in request packet for this command includes:

IDNameOptionalDescription
0server_information_idsnoAn array comprising integers containing values from the Server Information Identifiers.

Response

The response item outlined in response packet for this command includes:

Name Type Description
Server Information Object An object containing requested Xentara server information.

The server information object contains the requested server information identifiers as keys, paired with their respective values. If an error occurs, the response will include an error packet with detailed error information.

Errors

Below is the list of the potential errors that may be encountered with this command. Further details regarding errors in the Xentara WebSocket interface can be accessed here.

Sr. No. Error Code Error Description
1 -32700 Parse Error
2 -32603 Internal Error
3 -32602 Invalid Parameter
4 -32600 Invalid Request
5 -32000 Missing Client Hello Request

Examples

Request

Below is an example for the request to server information of the Xentara HTTP Server. The request is made to get current xentara version and user name of the host machine using server information identifiers. The message id 65 is an arbitrary number assigned for this particular request.

[
  0,                 # Request Packet
  65,                # Message Id
  0,                 # Server Information OpCode
  {                  # Server Information Object
    0: [0, 1, 2]     # Server Information Identifiers
  }
]

Response

Below is an example of the successful response to the aforementioned request. It indicates a package type of 1, signifying a successful response. The provided Message ID is intended for matching with the corresponding request. The response includes an object containing the running xentara version, the username of the account and the file path to the model.

[
  1,                                   # Packet Type - Success Response
  65,                                  # Message Id
  {                                    
    0: "Xentara Version",              # Xentara Version
    1: "User Name",                    # User name 
    2: "path/to/model/file"            # Path to current model file
  }                                    
]