Issue:
Data not updating on the aggregate/ central CPCB server/ How to get JSON logs.
Reason:
Below is the list of common Status Codes in Response JSON:
Status | Description |
1 | Success |
0 | Request failed because of unknown reason |
10 | Wrong API Key |
11 | Invalid Json e.g wrong data type, field etc |
101 | Invalid industry id i.e this industry id is not present in the system |
102 | Invalid station id i.e station id is not present for this industry id. |
103 | Correction not within 7 days |
104 | No data present for one of the time stamp in change request |
105 | Required fields not present in request |
106 | Some other error while saving CR (Change Request) |
107 | ‘responseURL’ field present in request is not valid |
How to get JSON request?
1.Take the JSON request from EnviroConnect server.
Site Admin->System Configuration->Get JSON Logs->Export Logs.
2. Search for the device id (device id can be found by clicking on the device from device tree on EnviroConnect server and mouse over to the current data. Device Id can be seen above the taskbar).
e.g.
DeviceId: 1340
postUrl: http://rtdms.cpcb.gov.in/v1.0/industry/TDPL/station/1340/data
JSON data: [{"diagnostics":[],"params":[{"unit":"mg\/Nm3","flag":"U","parameter":"pm","value":0.0,"timestamp":1512107150000}],"deviceId":"fm_1340_1340_PM"}]
3. Now to check response of this JSON request use Postman Tool.