Xentara WebSocket API Specification v2.0.4
User Manual
|
OpCode | Name | Description |
---|---|---|
7 | unsubscribe | Terminates the existing subscription. |
The parameter object outlined in request packet for this command includes:
ID | Name | Optional | Description |
---|---|---|---|
0 | subscription_id | no | A UUID representing the existing subscription, created using subscribe command. |
In case of successful execution, the response item indicated in response packet contains no elements. It simply includes the successful response packet type and the message id. If an error occurs, the response will include an error packet with detailed error information.
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 | -32110 | Unknown Subscription Id |
Below is an example of a unsubscribe request, indicating the subscription id of an already existing subscription created using the subscribe command. The message id 65 is an arbitrary number assigned for this particular request.
[ 0, # Request Packet 65, # Message Id 7, # Unsubscribe OpCode { # Unsubscribe Object 0: 37('E3EE10714D884BA18E5D0F1E4CE25EE8'), # Subscription UUID } ]
Below is an example of a successful response to the mentioned request, indicating the subscription is unsubscribed. It includes a package type of 1, representing a successful response. The provided message id is utilized for matching with the corresponding request.
[ 1, # Packet Type - Success Response 65 # Message Id ]