Xentara WebSocket API Specification v2.0.3
User Manual
Lookup Command

Command

OpCodeNameDescription
3lookupLook up a Xentara Element in Xentara model tree.

Parameters

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

IDNameOptionalDescription
0primary_keynoA text string denoting the primary key of a Xentara Element. The string should not be empty.

Response

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

Name Type Description
Xentara Element UUID UUID A UUID specifying the UUID of the Xentara element in format of UUIDs.

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
6 -32100 Unknown Element

Examples

Request

Below is an example for the request to lookup for a element with the primary key "Group 1.Data Point 1" in the Xentara model tree. The message id 65 is an arbitrary number assigned for this particular request.

[
  0,                            # Request Packet
  65,                           # Message Id
  3,                            # Lookup OpCode
  {                             # Lookup Object
    0: "Group 1.Data Point 1"   # Primary Key of the Xentara Element
  }
]

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 also includes the UUID of the requested Xentara element.

[
  1,                                       # Packet Type - Success Response
  65,                                      # Message Id
  37(h'E3EE10714D884BA18E5D0F1E4CE25EE8')  # Xentara Element UUID
]