From 8efd8238e308bf87519ba39264258fdb6bd7c9dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E6=A2=A6?= <1101766085@qq.com> Date: Tue, 12 Apr 2022 12:32:54 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20=E4=BC=98=E5=8C=96=20http-api.md=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/http-api.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/http-api.md b/docs/http-api.md index 4c997de..bdb5c52 100644 --- a/docs/http-api.md +++ b/docs/http-api.md @@ -30,7 +30,7 @@ | 104 | 请求方法错误 | | 105 | 未知错误 | -## + ## 消息发布 @@ -207,3 +207,32 @@ $ curl -i --basic -u mica:mica -X POST "http://localhost:8083/api/v1/mqtt/unsubs {"code":0} ``` + +## 踢除指定客户端 + +### DELETE /api/v4/clients/{clientid} + +踢除指定客户端。注意踢除客户端操作会将连接与会话一并终结。 + +**Query Parameters:** + +| Name | Type | Required | Description | +| -------- | ------ | -------- | ----------- | +| clientId | String | True | ClientID | + +**Success Response Body (JSON):** + +| Name | Type | Description | +| ---- | ------- | ----------- | +| code | Integer | 0 | + +**Examples:** + +踢除指定客户端 + +```bash +$ curl -i --basic -u mica:mica -X POST "http://localhost:8083/api/v1/clients/delete?clientId=123" + +{"code":0} +``` + -- GitLab