List Subscription Groups¶
List all the subscription groups.
Request format¶
GET http://{apigw-address}/dataService/subscribeGroups?orgId={}&pageSize={}&pageToken={}
Request parameters (URI)¶
Name |
Location (Path/Query) |
Required or not |
Data type |
Description |
---|---|---|---|---|
orgId |
Query |
Yes |
String |
Organization ID which the asset belongs to. How to get Organization ID>> |
pageSize |
Query |
No |
Int |
Number of the records displayed in each page, where the default value “0” means all the subscription groups are read. The default value is used if this field is left blank. |
pageToken |
Query |
No |
Int |
Page number of each record page, where the default value “1” means the first page. The default value is used if this field is left blank. |
Note
pageSize
and pageToken
are used to specify the display of returned results. For example, if you want to display the records from No.201 to No.300, you should set pageSize=100
pageToken=3
. pageSize=100
is used to paginate the records into 100 records per page, while pageToken=3
means to search the third page, i.e. the records from No. 201 to No. 300.
Response parameters¶
Name |
Data type |
Description |
---|---|---|
status |
Int |
Status code |
msg |
String |
Response message |
submsg |
String |
Response sub-message |
body |
Null |
Response message body |
data |
Object |
Response data object, the structure of which is in the table below |
pageToken |
String |
Page number of each record page, where the default value |
---|---|---|
pageSize |
Int |
Number of the records displayed in each page, where the default value “0” means all the subscription groups are read. The default value is used if this field is left blank. |
totalSize |
String |
Total number of returned records |
data |
Array |
List of returned subscription group information. The list element is a JSON object. The structure is in the table below. |
Name |
Data type |
Description |
---|---|---|
id |
String |
Internal data ID |
subscribeGroupId |
String |
Subscription group ID |
enable |
Boolean |
Whether to enable the subscription group |
subscribeAll |
Boolean |
Whether the subscription group subscribes all the measurement points |
subscribeModelList |
Array |
List of the subscribed models, where the list element is the model ID |
subscribeProductList |
Array |
List of the subscribed products, where the list element is the Product Key |
subscribeAssetList |
Array |
List of the subscribed assets, where the list element is the asset ID |
subscribeDeviceList |
Array |
List of the subscribed devices, where the list element is a JSON object. The structure is in the table below. |
data.subscribeModelPointList |
Array |
List of the measurement points associated to the subscribed models. The list element is a JSON object. The structure is in the table below. |
data.subscribePointList |
Array |
List of the points associated to the subscribed devices. The list element is a JSON object. The structure is in the table below. |
Name |
Data type |
Description |
---|---|---|
productKey |
String |
Product key of the subscribed device |
deviceKey |
String |
Device key of the subscribed device |
Name |
Data type |
Description |
---|---|---|
modelId |
String |
ID of the model that the device belongs to |
pointList |
Array |
List of point IDs, where the list element is the point ID |
Name |
Required or not |
Description |
---|---|---|
assetId |
String |
Asset ID of the device asset that the measurement point belongs to, which is used to specify a device asset |
productKey |
String |
Product key of the product that the measurement point belongs to, which is used to specify a device asset along with the |
deviceKey |
String |
Device key of the product that the measurement point belongs to, which is used to specify a device asset along with the |
pointList |
Array |
List of measurement point IDs |
Note
In the subscribePointList object, the assetId is preferred to identify a device. If assetId does not exist, the combination of deviceKey and productKey will be used to identify a device.
Samples¶
Request Sample¶
GET http://{apigw-address}/dataService/subscribeGroups?orgId=o15434988531231&pageSize=1&pageToken=1
Response Sample¶
{
"status":0,
"msg":"Success",
"submsg":null,
"body":null,
"data":{
"pageToken":1,
"pageSize":10,
"totalSize":22,
"data":[
{
"id":"dfasdfdsfsadf",
"subscribeGroupId":"DATASVC.SUB.group1",
"enable":true,
"persistent":true,
"subscribeAll":false,
"subscribeModelList":[
"model1",
"model2",
"model3"
],
"subscribeProductList":[
"product1",
"product2",
"product3"
],
"subscribeAssetList":[
"asset1",
"asset2",
"asset3"
],
"subscribeDeviceList":[
{
"productKey":"productKey1",
"deviceKey":"deviceKey1"
},
{
"productKey":"productKey2",
"deviceKey":"deviceKey2"
}
],
"subscribeModelPointList":[
{
"modelId":"model1",
"pointList":[
"point1",
"point2",
"point3"
]
},
{
"modelId":"model2",
"pointList":[
"point1",
"point2",
"point3"
]
}
],
"subscribePointList":[
{
"assetId":"asset10",
"productKey":"productKey10",
"deviceKey":"deviceKey10",
"pointList":[
"point1",
"point2",
"point3"
]
},
{
"assetId":"",
"productKey":"productKey11",
"deviceKey":"deviceKey11",
"pointList":[
"point1",
"point2",
"point3"
]
}
]
},
{
"id":"fdafdsafdsfas",
"subscribeGroupId":"DATASVC.SUB.group2",
"enable":true,
"persistent":true,
"subscribeAll":false,
"subscribeModelList":[
"model1",
"model2",
"model3"
],
"subscribeProductList":[
"product1",
"product2",
"product3"
],
"subscribeAssetList":[
"asset1",
"asset2",
"asset3"
],
"subscribeDeviceList":[
{
"productKey":"productKey1",
"deviceKey":"deviceKey1"
},
{
"productKey":"productKey2",
"deviceKey":"deviceKey2"
}
],
"subscribeModelPointList":[
{
"modelId":"model1",
"pointList":[
"point1",
"point2",
"point3"
]
},
{
"modelId":"model2",
"pointList":[
"point1",
"point2",
"point3"
]
}
],
"subscribePointList":[
{
"assetId":"asset10",
"productKey":"productKey10",
"deviceKey":"deviceKey10",
"pointList":[
"point1",
"point2",
"point3"
]
},
{
"assetId":"",
"productKey":"productKey11",
"deviceKey":"deviceKey11",
"pointList":[
"point1",
"point2",
"point3"
]
}
]
}
]
}
}