V2.5 Search Device Group¶
Search device groups.
Request Format¶
GET https://{apigw-address}/connect-service/v2.5/deviceGroups?action=searchGroup
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID which the asset belongs to. How to get orgId>> |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
expression |
Optional |
String |
The query expression, which supports sql-like query. The fields that are supported for query include: |
pagination |
Optional |
Pagination Request Struct |
For more details, see Pagination Request Struct |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
code |
number |
Failed or succeeded to create an alert. 0: succeeded, -1: failed. |
msg |
String |
Returns |
requestId |
String |
A unique ID to identify a request. |
data |
DataStruct. |
See Device Struct. |
pagination |
Pagination Request Struct |
Device Struct¶
Name |
Data Type |
Description |
---|---|---|
groupId |
String |
Device group ID |
orgId |
String |
The organization ID which the asset belongs to. How to get orgId>> |
name |
StringI18n |
The device group name. For more details on the structure and locales supported, see Internationalized name struct. |
desc |
String |
Device group description. |
type |
String |
Device group type: STATIC, DYNAMIC. |
condition |
String |
Conditions of the dynamic device group |
createTime |
number |
Create time. |
updateTime |
number |
Update time. |
Samples¶
Request Sample¶
url: https://{apigw-address}/connect-service/v2.5/deviceGroups?action=searchGroup&orgId=yourOrgId
method: POST
requestBody:
{
"expression": "groupId in ('groupId')",
"pagination": {
"pageNo": 1,
"pageSize": 100
}
}
Return Sample¶
{
"code": 0,
"msg": "OK",
"requestId": "901189f7-c31b-436f-beca-67c3dac92428",
"data": [
{
"groupId": "yourGroupId",
"orgId": "yourOrgId",
"name": {
"defaultValue": "GroupName",
"i18nValue": {
"en_US": "name",
"zh_CN": "中文名",
"es_ES": "nombre",
"ja_JP": "名前"
}
},
"desc": "groupDescription",
"type": "STATIC",
"condition": null,
"status": "READY",
"createTime": 1718950104553,
"updateTime": 1718950124698
}
],
"pagination": {
"sortedBy": null,
"pageNo": 1,
"pageSize": 100,
"totalSize": 1
}
}