Skip to main content
Skip table of contents

Kill client ID

You can now kill a connected MQTT client with a system key and client ID through an endpoint. The client can then stay disconnected or reconnect using the same or different client ID. When the client is killed, everything related to the client is cleaned up, so the next time the client connects, it will act as a fresh new MQTT connection.

Endpoint

There is a new endpoint that has admin-only permissions:

/admin/<system key>/killclient?clientid=<client id to be killed>

For now, you can only pass one client ID to the endpoint. In a cluster, the code for this endpoint finds the node on which <clientid> is connected and forwards the request to that node. Or, if the node is the local node, it operates locally.

The endpoint succeeds if it finds the client ID and successfully kills its connection. Otherwise, a failure is returned with an appropriate error message.

This endpoint can also be called on an edge. In this case, it will kill the client only if it is connected to that edge.

Example

uri: https://platform.clearblade.com/
system_key: e4a2c4f80bb894b7d58696a2a941
dev_token: abc
clientid: def

The example above generates the following curl:

curl -X POST "https://platform.clearblade.com/admin/e4a2c4f80bb894b7d58696a2a941/killclient?clientid=def" -H "accept: application/json" -H "ClearBlade-DevToken: abc"

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.