1. API Description
api request domain name:
iot.cloud.tencent.com/api/exploreropen/tokenapi.
This interface (AppGetDeviceInFamily) is used to query device details. 2. Input Parameter
Name | Type | Required | Description |
AccessToken | String | Yes | Common parameter. AccessToken is used for user authentication of a logged-in user. |
RequestId | String | Yes | Common parameter. Unique request ID can be generated manually. It is recommended to use uuId. When locating issues, you need to provide the RequestId for the request. |
Action | String | Yes | Common parameter. This interface takes values: AppGetDeviceInFamily. |
ProductId | String | Yes | product ID. |
FamilyId | String | Yes | Family ID. |
DeviceName | String | Yes | Device name. |
3. Output Parameter
Name | Type | Description |
RequestId | String | Common parameter. Unique request ID can be generated manually. It is recommended to use uuId. When locating issues, you need to provide the RequestId for the request. |
DeviceId | String | Device ID is a combination of product ID and device name. |
ProductId | String | product ID. |
DeviceName | String | Device name. |
AliasName | String | Device alias. |
IconUrl | String | Icon URL. |
FamilyId | String | Family ID. |
RoomId | String | Room ID. |
CreateTime | Int64 | Creation time, UNIX second-level timestamp. |
UpdateTime | Int64 | Last update time, UNIX second-level timestamp. |
4. Example
Input example
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1content-type: application/json{"RequestId": "082b70e-3d05-4179-9c94-6c70082e4a7","Action": "AppGetDeviceInFamily","ProductId":"R32ONVL0EU","FamilyId":"xxx","DeviceName":"df2eSJyY","AccessToken": "xxxv2"}
Output sample: successful
{"Response": {"Data": {"DeviceId": "R32ONVL0EU/df2eSJyY","ProductId": "R32ONVL0EU","DeviceName": "df2eSJyY","AliasName": "12345","IconUrl": "","FamilyId": "","RoomId": "","DeviceType": 0, // 0 Ordinary 1 Gateway device 2 Subdevice"CreateTime": 1574931773,"UpdateTime": 1574931945},"RequestId": "082b70e-3d05-4179-9c94-6c70082e4a7"}}
5. Error Code
Error Code | Description |
InternalError | Internal error. |
InvalidParameterValue | Invalid parameter value. |
InvalidParameterValue.InvalidAccessToken | The Token is invalid. |
UnauthorizedOperation | No permission to operate. |
UnauthorizedOperation.APPNoPermissionToStudioProduct | The App has no permission to operate this product. |
ResourceNotFound | The resource does not exist. |
ResourceNotFound.StudioMemberNotExist | The family member is not created or has been deleted. |