V2.5 Search Device by Device Group


Search devices by device groups.

Request Format


POST https://{apigw-address}/connect-service/v2.5/deviceGroups?action=searchDeviceByDeviceGroup

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

groupId

Mandatory

String

Device group ID

expression

Optional

String

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

Device Struct

See Device Struct.

pagination

Pagination Request Struct

See Pagination Request Struct>>

Samples

Request Sample


url: https://{apigw-address}/connect-service/v2.5/deviceGroups?action=searchDeviceByDeviceGroup&orgId=yourOrgId&groupId=yourGroupId
method: POST

Return Sample


{
    "code": 0,
    "msg": "OK",
    "requestId": "4b64be78-72c6-4eee-8cc5-227f0d0d2a5a",
    "data": [{
        "orgId": "yourOrgId",
        "assetId": "assetId",
        "modelId": "modelId",
        "modelIdPath": "modelIdPath",
        "productKey": "productKey",
        "productName": {
            "defaultValue": "ProductName",
            "i18nValue": {
                "en_US": "name",
                "zh_CN": "名称"
            }
        },
        "productType": "Device",
        "dataFormat": "Custom",
        "deviceKey": "deviceKey",
        "deviceName": {
            "defaultValue": "deviceName_test",
            "i18nValue": {
                "en_US": "name",
                "zh_CN": "名称"
            }
        },
        "deviceSecret": null,
        "sessionKey": null,
        "deviceDesc": "Device description",
        "timezone": "+08:00",
        "deviceAttributes": {
            "attribute1": "value1",
            "attribute2": "value2"
        },
        "deviceTags": {
            "tag1": "tagValue1",
            "tag2": "tagValue2"
        },
        "mirrorSource": null,
        "firmwareVersion": null,
        "createTime": 1718950104553,
        "status": "inactive",
        "statusSource": null,
        "activeTime": 0,
        "lastOnlineTime": 0,
        "lastOfflineTime": 0,
        "treeIds": [],
        "measurepointLastUpdate": null,
        "eventLastUpdate": null,
        "attributeLastUpdate": null,
        "featureLastUpdate": null
    }],
    "pagination": {
        "sortedBy": null,
        "pageNo": 1,
        "pageSize": 100,
        "totalSize": 1
    }
}