Unsubscribing from topics
You must have a WebSocket secure connection to the switch.
The switch must have REST API access enabled. The REST API access mode can be either read-only or read/write.
Use a comma to separate topics in a list of topics.
You must be connected as the same subscriber that subscribed to the topic. For example, you must be using the same web browser connection or be passing the same session cookie with the request.
{
"type": "unsubscribe",
"topics": [
{
"name": "/rest/v1/system/vrfs/default"
}
]
}
If the subscriber does not have a subscription to that topic, the following message is returned:
{
"type": "error",
"message": "No subscription for topic(s) <topic-name>."
}
The error can indicate that you have already unsubscribed, the connection was lost, or you attempted to unsubscribe from a different subscriber.
If the request is successful, the following message is returned:
{
"type": "success",
"message": "Successfully unsubscribe."
}