FreshlianceFreshliance
Tracker document
Gateway document
  • English
  • 简体中文
Tracker document
Gateway document
  • English
  • 简体中文
  • API introduction

    • Overview
    • Parameter
    • Signature
    • Rules
    • Error code
  • API list

    • User information
    • Device information
    • Device data
    • Device group list
    • Grouped device List
    • Remote configuration
    • Sensor template

Obtain sensor template page

Interface Description

Obtain the user device configuration template page based on the query conditions

Interface Method

gw.configTemplate.page

Request Parameter

NameTypeRequiredDescriptionExample
pageNumintYesPage number, starting from 11
pageSizeintYesPage size, Max. 5010
templateNamestringNoTemplate nametemplate

Return Data

NameTypeRequiredDescriptionExample
totalintYesTotal quantity4
rowsarray[object]YesData list
rows.configIdintYesConfiguration ID47402
rows.startDelayintYesStart delay0
rows.collectIntervalintYesLogging interval1
rows.templateNamestringYesTemplate nameTemplate 1
rows.categoryNamestringYesCategory nameGSP
rows.categoryIdintYesCategory id9
rows.sensorConfigProbeListarray[object]YesProbe information
rows.sensorConfigProbeList.configIdintYesConfiguration ID
rows.sensorConfigProbeList.probeTypeintYesProbe type 0: Built-in
1: External probe 1
2: External probe 2
0
rows.sensorConfigProbeList.temHighdoubleNoMin. value of high temperature alarm10.0
rows.sensorConfigProbeList.temLowdoubleNoMax. value of low temperature alarm10.0
rows.sensorConfigProbeList.humHighdoubleNoMin. value of high humidity alarm10.0
rows.sensorConfigProbeList.humLowdoubleNoMax. value of low humidity alarm10.0
rows.sensorConfigProbeList.lightHighdoubleNoMin. value of high illumination alarm10.0
rows.sensorConfigProbeList.lightLowdoubleNoMax. value of low illumination alarm10.0
rows.sensorConfigProbeList.co2HighdoubleNoMin. value of high CO2 alarm10.0
rows.sensorConfigProbeList.co2LowdoubleNoMax. value of low CO2 alarm10.0
rows.sensorConfigProbeList.sensorAlarmListarray[object]NoAlarm point information
rows.sensorConfigProbeList.sensorAlarmList
.alarmId
intNoSensor alarm ID100
rows.sensorConfigProbeList.sensorAlarmList
.probeType
intNoProbe type
0: Built-in
1: External probe 1
2: External probe 2
0
rows.sensorConfigProbeList.sensorAlarmList
.alarmZone
intNoAlarm zone High alarm: H; Low alarm: LH
rows.sensorConfigProbeList.sensorAlarmList
.alarmProperty
intNoAlarm property
1:Temperature
2: Humidity
3: Illumination
4: CO2
1
rows.sensorConfigProbeList.sensorAlarmList
.alarmType
intNoAlarm type
1: Low alarm
2: High alarm
1
rows.sensorConfigProbeList.sensorAlarmList
.alarmWay
intNoAlarm way
1: Single
2: Cumulative
1
rows.sensorConfigProbeList.sensorAlarmList
.alarmDelay
intNoAlarm delay
rows.sensorConfigProbeList.sensorAlarmList
.alarmThreshold
doubleNoAlarm threshold
rows.sensorConfigProbeList.sensorAlarmList
.sort
intNoAlarm point list (start from 1)

Example for Requesting Parameter

{
  "appId": "658409073956360262328652394",
  "method": "gw.configTemplate.page",
  "signType": "RSA2",
  "timestamp": 1755662900000,
  "version": "1.0",
  "bizContent": {
    "templateName": "Template 1",
    "pageNum": 1,
    "pageSize": 10
  },
  "sign": "hFR2xeKVOhSIbRY8A8xrXWNY98B5kFaitoKuJXXfLsDvfeyjzfYIJkvyU2RcwYgb3L+s9aq7xfxz43K/Rx1u2QQiKt30UOS0R9Wd59gqkLVke1uV0d5n40zVX/aakt0G82IlFb4LhuTH1HuGkNfLCRWawP8uq+Q97frtrlRKmXie7zEdHtIIkbvCTOu52dASfSRIKxtr20FjAUuA/Hy/LiytUSvobM6ZycOvuvifGIOyumVTDgh1pmBc/pcP6tCTb5g2JPm6W1TY97zkIZojOH7awb579wLgdIqaACNTWQoUWLBX9xkK5HFksQhzYYIBz5NxC5PLME1LHFg82fFDw=="
}

Example for Returning Data

{
  "code": "0",
  "data": {
    "total": 1,
    "rows": [
      {
        "createTime": "1755662900000",
        "templateName": "Template 1",
        "collectInterval": 1,
        "configId": 47402,
        "sensorConfigProbeList": [
          {
            "sensorAlarmList": [
              {
                "alarmZone": "L1",
                "alarmThreshold": 100,
                "sort": 1,
                "alarmDelay": 0,
                "alarmWay": 1,
                "alarmType": 1,
                "probeType": 0,
                "configId": 47402,
                "alarmProperty": 3,
                "alarmId": 13384
              }
            ],
            "probeType": 0,
            "configId": 47402
          }
        ],
        "startDelay": 0,
        "categoryName": "GSP",
        "categoryId": 9
      }
    ]
  },
  "msg": "success",
  "sign": "V+6cn7jXzLxiB14jub3i3r8+GfJHU28KDeVK3CHDDWHY/HskvomktMIfPCKqFRSU/D8DgqGLYlGtusAfFNcKgQsMB/vQkiozqN4BlKSz6vwRX19hquk+exaQ/Mb4Dsah20A0jzbsLOS47zEiDlw2vZ6GxGquomwNn7ogdob30vA39+hJrj3zeP/D5ZkaCLrQP21hDiJW1aSDHspncjlfMY1JujYwWAJuLkg/Bh0beSAjLbybJIP+Hxzn3bulThkBvAwY7u3zQTjSUAFA4+7U2YaeE+YUm9hGOEiUq8HwC0m9r3Igkfv22lZRvyOwSqpBsMuUCXGuPEUwSf/A0FXJsA=="
}

Obtain Sensor Template Details

Interface Description

Obtain sensor template details based on template configuration ID.

Interface Method

gw.configTemplate.get

Request Parameter

NameTypeRequiredDescriptionExample
configIdlongYesTemplate configuration id2235

Return Data

NameTypeRequiredDescriptionExample
sensorConfigobjectYesSensor configuration information
sensorConfig.startDelayintYesStart delay0
sensorConfig.collectIntervalintYesLogging interval0
sensorConfig.categoryIdintYesCategory ID1
sensorConfig.templateNamestringYesTemplate nameConfiguration of Warehouse 1
sensorAlarmListarray[object]NoAlarm point information
sensorAlarmList.alarmZonestringNoAlarm zone
High alarm:H
Low alarm:L
H
sensorAlarmList.alarmPropertyintNoAlarm property
1:Temperature
2: Humidity
3:Illumination 4: CO2
1
sensorAlarmList.alarmTypeintNoAlarm type
1: Low alarm
2: High alarm
1
sensorAlarmList.alarmWayintNoAlarm way
1: Single
2: Cumulative
1
sensorAlarmList.probeTypeintNoProbe type
0: Built-in
1: External probe 1
2: External probe 2
0
sensorAlarmList.alarmDelayintNoAlarm delay1
sensorAlarmList.alarmThresholddoubleNoAlarm threshold20.0
categoryNamestringYesCategory nameGSP
categoryIdintYesCategory id9

Example for Requesting Parameter

{
	"appId": "658409073956360262328652394",
	"method": "gw.configTemplate.get",
	"format": "JSON",
	"charset": "UTF-8",
	"signType": "RSA2",
	"timestamp": "1755662900000",
	"version": "1.0",
	"bizContent":{
		"configId":47360
	},
"sign": "hFR2xeKVOhSIbRY8A8xrXWNY98B5kFaitoKuJXXfLsDvfeyjzfYIJkvyU2RcwYgb3L+s9aq7xfxz43K/Rx1u2QQiKt30UOS0R9Wd59gqkLVke1uV0d5n40zVX/aakt0G82IlFb4LhuTH1HuGkNfLCRWawP8uq+Q97frtrlRKmXie7zEdHtIIkbvCTOu52dASfSRIKxtr20FjAUuA/Hy/LiytUSvobM6ZycOvuvifGIOyumVTDgh1pmBc/pcP6tCTb5g2JPm6W1TY97zkIZojOH7awb579wLgdIqaACNTWQoUWLBX9xkK5HFksQhzYYIBz5NxC5PLME1LHFg82fFDw==" 
}

Example for Returning Data

{
    "code": "0",
    "data": {
        "sensorAlarmList": [
            {
                "alarmZone": "H1",
                "alarmType": 2,
                "probeType": 0,
                "alarmProperty": 3,
                "alarmThreshold": 2000.0,
                "alarmDelay": 0,
                "alarmWay": 1
            },
            {
                "alarmZone": "L1",
                "alarmType": 1,
                "probeType": 0,
                "alarmProperty": 3,
                "alarmThreshold": 1000.0,
                "alarmDelay": 0,
                "alarmWay": 1
            }
        ],
        "sensorConfig": {
            "collectInterval": 1,
            "templateName": "Template 1",
            "startDelay": 0,
            "categoryId": 9
        },
        "categoryName": "GSP",
        "categoryId": 9
    },
    "msg": "success",
    "sign": "dsyHf2tscg4zYgbs1UoO0DqawLhWI4dpWF+JUE1qZ6PTq02+z+jpN7wf/IvxT62ZkucoqDCMe9ArjoH6GoD1bh+tZO4JlxidBJfcF419HRzI1wt9EVjR7k5CaI2s1wwQHgnOi65kXFKm+jcYGD6TMxX17sc80VFONfVv++A0+bKDrECBGty0AnW1do3G4ozG94TQX2k73K2f50XvGXCWwjR5E8LKjr4aQj1bhjAEfcxD8EOPPoT9A6CCRAXdb08qkmzWG5stTLl1/ndXCu40QraDc81ilOmoMMfAzBpU71S0aud4mQqX1yPnxVG5xy9n5r5wbJypBvPb3+Ter9Hh4g==",
    "subCode": "",
    "subMsg": ""
}

Create New Configuration Template

Interface Description

Create a new template for gateway or sensor configuration

Interface Method

gw.configTemplate.create

Request Parameter

NameTypeRequiredDescriptionExample
sensorConfigobjectYesSensor configuration information
sensorConfig.startDelayintNoStart delay30
sensorConfig.collectIntervalintYesLogging interval30
sensorConfig.categoryIdintYesDevice category ID1
sensorConfig.templateNamestringYesTemplate nameWarehouse device
sensorAlarmListarray[object]NoAlarm point information
sensorAlarmList.alarmZonestringNoAlarm zone High alarm:H
Low alarm:L
H
sensorAlarmList.alarmPropertyintNoAlarm property
1:Temperature
2: Humidity
3: Illumination
4: CO2
1
sensorAlarmList.alarmTypeintNoAlarm type
1: Low alarm
2: High alarm
1
sensorAlarmList.probeTypeintNoProbe type
0: Built-in
1: External probe 1
2: External probe 2
1
sensorAlarmList.alarmWayintNoAlarm way
1: Single
2: Cumulative
1
sensorAlarmList.alarmDelayintNoAlarm delay30
sensorAlarmList.alarmThresholddoubleNoAlarm threshold30.0
categoryIdintYesCategory ID1
productCodestringYesProduct model codeA5

Return Data

NameTypeRequiredDescriptionExample
databooleanYestrue: Success; false: failedtrue

Example for Requesting Paramter

{ 
	"appId": "658409073956360262328652394", 
	"method": "gw.configTemplate.create",
	"format": "JSON", 
	"charset": "UTF-8", 
	"signType": "RSA2", 
	"timestamp": "1755662900000", 
	"version": "1.0", 
	"bizContent": {
		"sensorConfig":{
			"startDelay":0,
			"collectInterval":1,
			"templateName":"Template 1"
			},
		"sensorAlarmList":[{
			"alarmZone":"L",
			"alarmProperty":3,
			"alarmType":1,
			"probeType":0,
			"alarmWay":1,
			"alarmDelay":0,
			"alarmThreshold":100
			},
			{
			"alarmZone":"L",
			"alarmProperty":1,
			"alarmType":1,
			"probeType":1,
			"alarmWay":1,
			"alarmDelay":0,
			"alarmThreshold":190
			},{"alarmZone":"L",
			"alarmProperty":1,
			"alarmType":1,
			"probeType":2,
			"alarmWay":1,
			"alarmDelay":0,
			"alarmThreshold":50
			}],
			"productCode": "97",
			"categoryId":9
			}, 
	"sign": "hFR2xeKVOhSIbRY8A8xrXWNY98B5kFaitoKuJXXfLsDvfeyjzfYIJkvyU2RcwYgb3L+s9aq7xfxz43K/Rx1u2QQiKt30UOS0R9Wd59gqkLVke1uV0d5n40zVX/aakt0G82IlFb4LhuTH1HuGkNfLCRWawP8uq+Q97frtrlRKmXie7zEdHtIIkbvCTOu52dASfSRIKxtr20FjAUuA/Hy/LiytUSvobM6ZycOvuvifGIOyumVTDgh1pmBc/pcP6tCTb5g2JPm6W1TY97zkIZojOH7awb579wLgdIqaACNTWQoUWLBX9xkK5HFksQhzYYIBz5NxC5PLME1LHFg82fFDw==" }

Example for Returning Data

{
    "code": "0",
    "data": true,
    "msg": "success",
    "sign": "eAnF+imkUl+PQSOKAT4d01WSpCg+qH2a/ai/QqDbzoGiMMAAduoXGj36aTbs0iM7WEvoCrqwrPSP7G2ASOEZVCWlCna0WK3OX15wj8JMJ1cd5USoyBo44IW0mTLHs5bTjy73yEqF/g50F1ZeJvBw+aESSji5S48oGvrH1wXaSfCTZQ5+ReL9ZHvzU2lWVSfpS9DCuQ7f6g3uYBNWKAVVeRSki95Awsv4Yiqi8SBOa2ERbXmwp6LGllBEpJNarBf5VAvHUGeDSWD2nQWPsyWceZaAfViQCYf7jdMZ8JmI6bQHrYuCnhHLAjaI84DozDGc3CadZHdgOjwsO57nz9WPeQ==",
    "subCode": "",
    "subMsg": ""
}

Modify Configuration Template

Interface Description

Modify the configuration information in the template based on configuration ID.

Interface Method

gw.configTemplate.update

Request Parameter

NameTypeRequiredDescriptionExample
sensorConfigobjectConfiguration template information
sensorConfig.configIdintYesConfiguration ID1048
sensorConfig.startDelayintNoStart delay10
sensorConfig.collectIntervalintYesLogging interval10
sensorConfig.templateNamestringYesTemplate nametemplate-1
sensorAlarmListarray[object]NoAlarm point information
sensorAlarmList.alarmZonestringNoAlarm zone High alarm: H
Low alarm: L
H
sensorAlarmList.alarmPropertyintNoAlarm property
1:Temperature
2: Humidity
3: Illumination
4:CO2
1
sensorAlarmList.alarmTypeintNoAlarm type
1: Low alarm
2: High alarm
1
sensorAlarmList.probeTypeintNoProbe type
0: Built-in
1: External probe 1
2: External probe 2
0
sensorAlarmList.alarmWayintNoAlarm way
1: Single
2: Cumulative
1
sensorAlarmList.alarmDelayintNoAlarm delay0
sensorAlarmList.alarmThresholddoubleNoAlarm threshold30.0
configIdintYesConfiguration ID1345

Return Data

NameTypeRequiredDescriptionExample
databooleanYestrue: Success; false: Failedtrue

Example for Requesting Parameter

{   
	"appId": "658409073956360262328652394",
	"method": "gw.configTemplate.update",
	"format": "JSON",
	"charset": "UTF-8",
	"signType": "RSA2",
	"timestamp": "1755662900000",
	"version": "1.0",
	"bizContent": {
		"sensorConfig":{
			"startDelay":0,
			"collectInterval":1,
			"templateName":"Template 1"
			},
			"sensorAlarmList":[{
			"alarmZone":"L",
			"alarmProperty":3,
			"alarmType":1,
			"probeType":0,
			"alarmWay":1,
			"alarmDelay":0,
			"alarmThreshold":100
			},{
			"alarmZone":"L",
			"alarmProperty":1,
			"alarmType":1,
			"probeType":1,
			"alarmWay":1,
			"alarmDelay":0,
			"alarmThreshold":190},{
			"alarmZone":"L",
			"alarmProperty":1,
			"alarmType":1,
			"probeType":2,
			"alarmWay":1,
			"alarmDelay":0,
			"alarmThreshold":50
			}],
	"configId":47393
			},
   "sign": "hFR2xeKVOhSIbRY8A8xrXWNY98B5kFaitoKuJXXfLsDvfeyjzfYIJkvyU2RcwYgb3L+s9aq7xfxz43K/Rx1u2QQiKt30UOS0R9Wd59gqkLVke1uV0d5n40zVX/aakt0G82IlFb4LhuTH1HuGkNfLCRWawP8uq+Q97frtrlRKmXie7zEdHtIIkbvCTOu52dASfSRIKxtr20FjAUuA/Hy/LiytUSvobM6ZycOvuvifGIOyumVTDgh1pmBc/pcP6tCTb5g2JPm6W1TY97zkIZojOH7awb579wLgdIqaACNTWQoUWLBX9xkK5HFksQhzYYIBz5NxC5PLME1LHFg82fFDw==" }

Example for Returning Data

{
    "code": "0",
    "data": true,
    "msg": "success",
    "sign": "eAnF+imkUl+PQSOKAT4d01WSpCg+qH2a/ai/QqDbzoGiMMAAduoXGj36aTbs0iM7WEvoCrqwrPSP7G2ASOEZVCWlCna0WK3OX15wj8JMJ1cd5USoyBo44IW0mTLHs5bTjy73yEqF/g50F1ZeJvBw+aESSji5S48oGvrH1wXaSfCTZQ5+ReL9ZHvzU2lWVSfpS9DCuQ7f6g3uYBNWKAVVeRSki95Awsv4Yiqi8SBOa2ERbXmwp6LGllBEpJNarBf5VAvHUGeDSWD2nQWPsyWceZaAfViQCYf7jdMZ8JmI6bQHrYuCnhHLAjaI84DozDGc3CadZHdgOjwsO57nz9WPeQ==",
    "subCode": "",
    "subMsg": ""
}

Delete Template

Interface Description

Delete device configuration template

Interface Method

gw.configTemplate.delete

Request Parameter

NameTypeRequiredDescriptionExample
configIdintYesConfiguration template id3125

Return Data

NameTypeRequiredDescriptionExample
databooleanYestrue: Success; false: Failedtrue

Example for Requesting Parameter

{   
	"appId": "658409073956360262328652394",
	"method": "gw.configTemplate.delete",
	"format": "JSON",
	"charset": "UTF-8",
	"signType": "RSA2",
	"timestamp": "1755662900000",
	"version": "1.0",
	"bizContent":{
		"configId":47397
	},   
"sign": "hFR2xeKVOhSIbRY8A8xrXWNY98B5kFaitoKuJXXfLsDvfeyjzfYIJkvyU2RcwYgb3L+s9aq7xfxz43K/Rx1u2QQiKt30UOS0R9Wd59gqkLVke1uV0d5n40zVX/aakt0G82IlFb4LhuTH1HuGkNfLCRWawP8uq+Q97frtrlRKmXie7zEdHtIIkbvCTOu52dASfSRIKxtr20FjAUuA/Hy/LiytUSvobM6ZycOvuvifGIOyumVTDgh1pmBc/pcP6tCTb5g2JPm6W1TY97zkIZojOH7awb579wLgdIqaACNTWQoUWLBX9xkK5HFksQhzYYIBz5NxC5PLME1LHFg82fFDw==" 
}   

Example for Returning Data

{
    "code": "0",
    "data": true,
    "msg": "success",
    "sign": "eAnF+imkUl+PQSOKAT4d01WSpCg+qH2a/ai/QqDbzoGiMMAAduoXGj36aTbs0iM7WEvoCrqwrPSP7G2ASOEZVCWlCna0WK3OX15wj8JMJ1cd5USoyBo44IW0mTLHs5bTjy73yEqF/g50F1ZeJvBw+aESSji5S48oGvrH1wXaSfCTZQ5+ReL9ZHvzU2lWVSfpS9DCuQ7f6g3uYBNWKAVVeRSki95Awsv4Yiqi8SBOa2ERbXmwp6LGllBEpJNarBf5VAvHUGeDSWD2nQWPsyWceZaAfViQCYf7jdMZ8JmI6bQHrYuCnhHLAjaI84DozDGc3CadZHdgOjwsO57nz9WPeQ==",
    "subCode": "",
    "subMsg": ""
}
Prev
Remote configuration