Get Pipeline Details

Get the details of a specific stream processing pipeline.

Prerequisites

A stream processing pipeline is created with the Stream Processing service, and the pipeline ID is available.

Request Format

GET https://{apigw-address}/streaming/v2.0/streaming/pipeline/{pipelineId}

Request Parameters (URI)

Name Location (Path/Query) Mandatory/Optional Data Type Description
pipelineId Path Mandatory String The stream processing pipeline ID, which can be found on the EnOS Management Console > Stream Processing > Stream Operation page.
orgId Query Mandatory String The organization ID. How to get the orgId>>
ifReleased Query Optional Boolean Specify whether the stream processing pipeline is released (true: pipeline is released; false: pipeline is not released). The default is false.

Response Parameters

Name Data Type Description
data List<JSONObject> Detailed information of the stream processing pipeline. For details, see data

data

Name Data Type Description
desc String Description of the stream processing pipeline.
pipelineId String Stream processing pipeline ID.
pipelineName String Stream processing pipeline name.
version String Template version that is used by the stream processing pipeline.
templateType Integer Type of the template that is used by the stream processing pipeline. Possible values are 1: Origin Template; 0: Time Window Aggregation Template; 2: Multi-Merging Template; 3: Electric Energy Cal (by Metering Reading) Template; 4: Electric Energy Cal (by Average Power) Template; 5: Electric Energy Cal (by Instant Power) Template.
templateName String Template that is used by the stream processing pipeline.
messageChannel Integer Message channel that is used by the stream processing pipeline (0: Real-Time Channel; 1: Offline Channel).
pipelineJson JSONObject Configuration of the stream processing pipeline in JSON format.

Error Code

Code Error Information Description
61108 Stream processing pipeline does not exit. Stream processing pipeline does not exist. Please check the pipeline ID.
99000 Internal Server Error. Internal service error.

Sample

Request Sample

url: https://{apigw-address}/streaming/v2.0/streaming/pipeline/{pipelineId}?orgId=yourOrgId

method: GET

Return Sample

{
  "code": 0,
  "msg": "OK",
  "data": {
   "pipelineId": "eec1c103-xxxx-44f6-9045-696dd1c873bb",
   "pipelineName": "Demo",
   "messageChannel": "0",
   "templateType": 2,
   "templateName": {
      "en_us": "xxx",
      "zh_cn": "电量计算模板(按平均功率)"
   },
   "version": "0.1.0",
   "desc": "",
   "pipelineJson": {
      "points": [
         {
            "inputPointId": "YL_Turbine_Model::YL.Meter.Input39",
            "outputPointId": "YL_Turbine_Model::YL.Merter.PI.Out11",
            "detailOutputPointId": null,
            "minValue": "0",
            "maxValue": "10000",
            "maxValueInclude": true,
            "minValueInclude": true,
            "exceptionPolicy": "2"
         }
      ],
      "piDetail": false
   }
}

Java SDK Sample

import com.alibaba.fastjson.JSONObject;
import com.envision.apim.poseidon.config.PConfig;
import com.envision.apim.poseidon.core.Poseidon;
import com.envision.apim.poseidon.request.PoseidonRequest;
import org.junit.Before;
import org.junit.Test;

public class Sample {
    private static final String API_Gateway_URL = "https://{domain_url}";
    private Poseidon poseidon;

    private static class Request extends PoseidonRequest {

        public void setBodyParams(String key, Object value) {
            bodyParams().put(key, value);
        }

        public void setMethod(String method) {
            this.method = method;
        }

        private String method;

        @Override
        public String baseUri() {
            return "";
        }

        @Override
        public String method() {
            return method;
        }
    }

    @Before
    public void init() {
        poseidon = Poseidon.config(
                PConfig.init()
                        .appKey("AccessKey of your APP")
                        .appSecret("SecretKey of your APP")
        ).method("GET");
    }

    @Test
    public void GetPipelineDetails() {
        Request request = new Request();

        JSONObject response = poseidon
                .url(API_Gateway_URL + "/streaming/v2.0/streaming/pipeline/{pipelineId}")
                .queryParam("orgId", "yourOrgId")
                .getResponse(request, JSONObject.class);
        System.out.println(response);
    }
}