Get Subscription Details¶
Get job details based on the subscription job ID.
Request Format¶
GET https://{apigw-address}/subscription-service/v1/subscription/{subId}
Request Parameters (URI)¶
Name  | 
Location (Path/Query)  | 
Required/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
subId  | 
Path  | 
Required  | 
String  | 
The subscription job ID.  | 
orgId  | 
Query  | 
Required  | 
String  | 
The OU ID where the subscription job belongs to. How to get orgId >>  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
id  | 
String  | 
The system ID of the subscription job.  | 
subId  | 
String  | 
The subscription job ID.  | 
app  | 
String  | 
The access key of the application.  | 
desc  | 
StringI18n  | 
International description of subscription jobs.  | 
orgId  | 
String  | 
The OU ID.  | 
type  | 
Enum  | 
Subscription type: 
  | 
content  | 
Content Struct  | 
The subscription job details. Content Struct >>  | 
Content Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
customers  | 
List<String>  | 
The OU ID that has been authorized to subscribe to the job.  | 
models  | 
List<DeviceModel>  | 
Model filtering conditions for the subscription job. DeviceModel Struct >>  | 
useAllModels  | 
Boolean  | 
Whether this job have subscribed to all available models in the OU,   | 
assetIds  | 
List<String>  | 
If the organization structure filtering conditions are specified, assetIds indicates the site IDs selected on the organization structure. Only the “Time Series Data” type is supported.  | 
structureRootId  | 
String  | 
Selected organization structure ID. Only the “Time Series Data Subscription” type is supported.  | 
tags  | 
Map<String, String>  | 
The device tag filtering conditions for subscription jobs, structured  
  | 
treeTags  | 
Map<String, String>  | 
The asset tree tag filtering condition for subscription jobs, structured   | 
eventTypes  | 
List<String>  | 
Device event type filtering conditions for subscription jobs, structure such as   | 
sourceEventType  | 
Map  | 
Device event type filtering conditions for subscription jobs, structure such as  
  | 
enabled  | 
Boolean  | 
Whether the subscription job has been started,   | 
DeviceModel Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
models  | 
String  | 
Subscribed Model ID.  | 
points  | 
List<String>  | 
Subscribed measurement point IDs, structure such as   | 
useAllPoints  | 
Boolean  | 
Whether to subscribe to all measurement points under the model,   | 
public  | 
Boolean  | 
Whether the model is a public model,   | 
Samples¶
Request Sample¶
url: https://{apigw-address}/subscription-service/v1/subscription/yourSubId?orgId=yourOrgId
method: GET
Response Sample¶
{
    "msg": null,
    "data": {
        "id": 61,
        "subId": "yourSubId",
        "app": "yourAppAccessKey",
        "desc": {
            "default": "Time Series Data - Online",
            "zh-CN": "时序数据-实时通道",
            "en-US": "Time Series Data - Online"
        },
        "orgId": "yourOrgId",
        "type": "DATA",
        "content": {
            "customers": [
                "CustomerOrgId"
            ],
            "models": [
                {
                    "modelId": "Demo1",
                    "useAllPoints": true,
                    "points": [
                        "lemo_point1_5min",
                        "merg_point_5min"
                    ],
                    "public": null
                }
            ],
            "useAllModels": false,
            "assetIds": [
                "assetId01",
                "assetId02"
            ],
            "structureRootId": "structureRootId",
            "tags": {
                "deviceTagKey": "deviceTagValue"
            },
            "treeTags": {
            },
            "eventTypes": [
            ],
            "sourceEventType": {
            }
        },
        "enabled": false
    },
    "subMsg": null,
    "requestId": null,
    "retCode": 0
}