Get Point Mapping

Get the mapping type of measurement points.

Request Format

POST http://{apigw-address}/edge-service/v1/point-mapping

Request Parameters (URI)

Request parameters (URI)

Name

Location

Required or not

Data type

Description

orgId

Query

True

String

Organization ID which the measurement point belongs to.

Request Parameters (Body)

Request parameters (Body)

Name

Required or not

Data type

Description

mdmids

True

String

Asset ID of the device that the measurement point belongs to. Multiple IDs should be separated with commas (,).

points

True

String

Point ID. Multiple IDs should be separated with commas (,).

Response Parameters

Response parameters

Name

Data type

Description

status

Int

Status code

msg

String

Response message

submsg

String

Response sub-message

data

Object

Response data, the structure of which is in the table below

Data Object

The structure of data object is shown as follows:

"data":{
   "Asset ID 1":{
      "Measurement point ID 1":Mapping type code,
      "Measurement point ID 2":Mapping type code,
      "Measurement point ID 3":Mapping type code
   },
   "Asset ID 2":{
      "Measurement point ID 4":Mapping type code,
      "Measurement point ID 5":Mapping type code,
      "Measurement point ID 6":Mapping type code
   }
   to be continued...
}

Where:

  • Asset ID: asset ID of the device that the measurement point belongs to. A JSON object.

  • Measurement point ID: point ID.

  • Mapping type code: int type. Mapping type code and its specific values and meanings are described as follows:

Mapping type code

For the specific meanings of the mapping type, see Edge Computing.

Mapping type code

Code

Mapping type

0

NO_MAPPING

1

EQUAL

2

CONTROL_SET

3

RATIO_AGAINST_SUM

4

SUM

5

RATIO

6

LOGICAL_OR

7

MULTICHANNEL

8

MULTIBIT

9

BIT_N

10

IF_EQUAL

11

IF_RANGE

12

PRODUCT

13

LOGICAL_AND

14

XOR

15

SUBTRACTION

16

BITS_M_TO_N

17

ENUM_N

18

MULTICHANNEL_SHORTTOINT

Sample

Request Sample

POST http://{apigw-address}/edge-service/v1/point-mapping

requestBody: {
   "mdmids": "RV7dPS1d,RV7dPS1c",
   "points": "CBX.STATUS002,CBX.STATUS009,CBX.STATUS008"
}

Return Sample

{
   "msg":"Success",
   "data":{
      "RV7dPS1d":{
         "CBX.STATUS002":1,
         "CBX.STATUS009":1,
         "CBX.STATUS008":1
      },
      "RV7dPS1c":{
         "CBX.STATUS002":1,
         "CBX.STATUS009":1,
         "CBX.STATUS008":1
      }
   },
   "submsg":null,
   "status":0
}

Java SDK Sample

public class GetOrganization {

    public static void main(String[] args) {
        url = "http://{ip}/edge-service/v1/point-mapping?orgId=o15716469511311";
        String appKey = "6362e9aa-4ed8-498b-a68c-3468c0447f6e";
        String appSecret = "a904f884-be2e-431a-b2f8-70fe1538d93b";
        Map < String, String > map = new HashMap < String, String > ();
        map.put("mdmids", "tp8kSXTd");
        map.put("points", "WTUR.EventList");
        String body = JSON.toJSONString(map);
        String str = Poseidon.config(PConfig.init().appKey(appKey).appSecret(appSecret))
            .url(url)
            .method("POST")
            .requestBody(body)
            .sync();
    }
}