Packets
Set panel events subscription
Enables or disables server-sent panel events for the current websocket session.
Set panel events subscription toggles whether the current session receives asynchronous panel events.
This operation is available only after successful Initialize.
Request
Set panel events subscription uses packet type = 17.
{
"type": 17,
"id": 17,
"subscribed": true
}Prop
Type
Response
{
"id": 17,
"status": 1
}Prop
Type
Behavior notes
- Request and response are regular text JSON websocket frames.
- This usecase can be called before or after authorization, as long as session is initialized.
subscribed = truestarts panel-event delivery to this session.subscribed = falsestops panel-event delivery to this session.- Operation is idempotent: repeating the same
subscribedvalue is valid. - Panel events are server-sent packets with special
id = 18446744073709551615. - Subscription state is preserved across valid session resumption. A brand-new session still starts unsubscribed and must enable panel events explicitly.
Set-panel-events-subscription statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | Subscription state updated successfully. |
Connection-close cases (before/around this usecase)
Set panel events subscription itself returns regular JSON responses, but session can still be closed by protocol/session guards:
| Close code | Error | When it happens |
|---|---|---|
4200 | connection is not initialized | Request was sent before successful Initialize. |
4201 | rate limit hit | Global per-session packet rate limit was exceeded. |
4302 | invalid request body | Packet body does not match the required schema for this operation. |
4304 | received unsupported data | Client sent unsupported frame type (request packets must be text JSON). |