新增期望消息
本地
本地
POST
http://127.0.0.1:9999/api/v1/expected/data
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
device_id
string
必需
send_type
string
必需
payload
string
可选
expiry
string
过期时间
label
string
可选
identify
string
标识符
示例
{
"device_id": "string",
"send_type": "string",
"payload": "string",
"expiry": "string",
"label": "string",
"identify": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:9999/api/v1/expected/data' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
device_id
string
必需
send_type
string
必需
payload
string
必需
created_at
string
必需
send_time
null
必需
status
string
必需
message
null
必需
expiry_time
string
必需
label
string
必需
tenant_id
string
必需
示例
{
"code": 200,
"message": "create expected data successfully",
"data": {
"id": "51d14415-2acd-82f4-820c-4d86bea46b3d",
"device_id": "d06e6186-7c7a-6b88-2209-85350850c924",
"send_type": "telemetry",
"payload": "{}",
"created_at": "2024-08-12T22:38:50.310503+08:00",
"send_time": null,
"status": "pending",
"message": null,
"expiry_time": "2024-04-12T08:00:00+08:00",
"label": "in dolor",
"tenant_id": "63a4b529"
}
}
修改于 2025-04-03 12:35:45