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: groupId, groupName, groupType. For more details, see How to use expression>>

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 OK if successful. Other returned values indicate failure.

requestId

String

A unique ID to identify a request.

data

DataStruct.

See Device Struct.

pagination

Pagination Request Struct

See Pagination Request Struct>>

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
  }
}