Xentara WebSocket API Specification v2.0.4
User Manual
|
OpCode | Name | Description |
---|---|---|
15 | check_access | Checks access for the specified light-weight sub-session. |
The parameter object outlined in request packet for this command includes:
ID | Name | Optional | Description |
---|---|---|---|
0 | sub_session_id | no | A UUID representing the existing opened session, created using create sub session command. The UUID cannot be null. |
The response item outlined in response packet for this command includes:
Name | Type | Description |
---|---|---|
Access | Object | An object containing the read and write access details (see below). |
The definition of access object is mentioned below:
ID | Name | Description |
---|---|---|
0 | read_access | A boolean indicating the read access status of the given sub-session. |
1 | write_access | A boolean indicating the write access status of the given sub-session. |
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 | -32001 | Duplicate Client Hello Request |
Below is an example of a check access request, indicating the session ID of an already opened session created using the create session command. The message id 65 is an arbitrary number assigned for this particular request.
[ 0, # Request Packet 65, # Message Id 15, # Check Access OpCode { # Check Access Object 0: 37('E3EE10714D884BA18E5D0F1E4CE25EE8') # Opened Sub-Session Id } ]
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 consists of an object containing the read and write access status for the requested sub-session.
[ 1, # Packet Type - Success Response 65, # Message Id { 0: true, # Read access status for the sub-session. 1: false, # Write access status for the sub-session. } ]