38 lines
1.0 KiB
HTTP
38 lines
1.0 KiB
HTTP
@url=https://api2.hik-cloud.com/oauth
|
|
@token=authorization: bearer a08a8044-3770-41f5-b5a5-048004a723ac
|
|
@token_type=bearer
|
|
|
|
### 客户端认证
|
|
POST {{url}}/token HTTP/1.1
|
|
Content-Type: application/x-www-form-urlencoded
|
|
|
|
client_id=164edfd71b744dd88c945dbd5ae30a9a&client_secret=2f580d932d7d46029a2091ece681035c&grant_type=client_credentials&scope=yy
|
|
|
|
### 924737beb6f74a8d85cb3177699198b2 02 浙江
|
|
GET {{url}}/open/basic/groups/actions/listAll HTTP/1.1
|
|
Authorization: {{token}}
|
|
|
|
### 设备注册
|
|
POST {{url}}/open/basic/devices/create HTTP/1.1
|
|
Content-Type: application/json
|
|
Authorization: {{token}}
|
|
|
|
{
|
|
"deviceSerial": "AF8534579",
|
|
"groupNo": "02",
|
|
"validateCode": "213222"
|
|
}
|
|
|
|
|
|
### 创建消费者 consumerId": "7db9420cdb2844f5ba8bba07d1417d54"
|
|
POST {{url}}/mq/consumer/group1 HTTP/1.1
|
|
Content-Type: application/json
|
|
Authorization: {{token}}
|
|
|
|
### 消费消息
|
|
POST {{url}}/mq/consumer/messages HTTP/1.1
|
|
Content-Type: application/x-www-form-urlencoded
|
|
Authorization: {{token}}
|
|
|
|
autoCommit=true&consumerId=7db9420cdb2844f5ba8bba07d1417d54
|