| Required role: | ApiUser |
| All Verbs | /Gateway/AddGatewayAndMeter |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Gateway | query | AddGateway | No | |
| Meter | query | AddMeter | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Command | form | string | No | |
| Options | form | RequestOptions | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| SendNoWait | form | bool | No | |
| RequestTimeout | form | int | No | |
| Debug | form | bool | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Type | form | string | No | |
| OrgName | form | string | No | |
| AreaName | form | string | No | |
| Name | form | string | No | |
| PhysicalAddress | form | long | No | |
| Longitude | form | double? | No | |
| Latitude | form | double? | No | |
| SIM | form | string | No | |
| IMEI | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| SectionName | form | string | No | |
| Address10 | form | long | No | |
| Protocol | form | string | No | |
| Name | form | string | No | |
| IMEI | form | string | No | |
| ProtocolCD | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| AddGatewayResult | form | bool | No | |
| GatewayId | form | long | No | |
| AddGatewayErrorMessage | form | string | No | |
| AddMeterResult | form | bool | No | |
| MeterId | form | long | No | |
| AddMeterErrorMessage | form | string | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Command | form | string | No | |
| Status | form | string | No | |
| ErrorMessage | form | string | No | |
| ErrList | form | List<long> | No | |
| DeviceList | form | List<DeviceData> | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ActionName | form | string | No | |
| DeviceNumber | form | string | No | |
| ActionResult | form | string | No | |
| ByteData | form | byte[] | No | |
| ByteResult | form | byte[] | No | |
| ErrorMessage | form | string | No | |
| ConnectStatus | form | int | No | |
| ByteDataHstr | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Gateway/AddGatewayAndMeter HTTP/1.1
Host: 188.68.237.94
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Gateway":{"Type":"String","OrgName":"String","AreaName":"String","Name":"String","PhysicalAddress":0,"Longitude":0,"Latitude":0,"SIM":"String","IMEI":"String"},"Meter":{"SectionName":"String","Address10":0,"Protocol":"String","Name":"String","IMEI":"String","ProtocolCD":"--"},"Command":"String","Options":{"SendNoWait":false,"RequestTimeout":0,"Debug":false}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"AddGatewayResult":false,"GatewayId":0,"AddGatewayErrorMessage":"String","AddMeterResult":false,"MeterId":0,"AddMeterErrorMessage":"String","Command":"String","Status":"String","ErrorMessage":"String","ErrList":[0],"DeviceList":[{"ActionName":"String","DeviceNumber":"String","ActionResult":"String","ByteData":"AA==","ByteResult":"AA==","ErrorMessage":"String","ConnectStatus":0,"ByteDataHstr":"00"}]}