文本传感器
存储文本
文本的 HTTP 集成允许使用以下结构存储长度最多 255 个字符的文本:
POST /services/gear/DeviceIntegrationService.svc/UpdateTextContainerStatus HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"text": "Sample text...",
"timestamp": "2024-02-23T14:55:03"
}参数
| 名称 | 说明 | 数据类型 |
|---|---|---|
| accessToken | 具有更新端点信息权限的访问令牌。更多信息请参见该页面。 | text |
| endpointID | 唯一端点标识符或设备地址与端点地址的组合(格式为 [deviceAddress]:endpointAddress,例如:[device-1234]:1)。这些值可以在端点管理页面找到。 | numeric |
| text | 要存储的文本内容 | text |
| timestamp | 可选值,表示快照的 UTC 日期和时间。日期格式必须与日期格式部分指定的格式之一相匹配。如果省略该字段,平台将假定测量对应于当前日期和时间。 | text |