We prefer cURL, but this document should serve as a reference for any HTTP based API tool.
Generally, your call will look like this:
curl -X {GET|POST} https://crns.QuaestaInstruments.com/api/{Resource} -H "API_KEY: {Your API Key}" ...
GET calls will typically have arguments in the URL body, like
... /api/{Resource}?{arg1}={arg1Value}&{arg2}={arg2Value}& ...
While is this OK for most calls, and recommended for most use-cases, you can also use headers for more robust arguments; and to keep your requests better structured. You can use headers with cURL like this:
curl -X GET https://crns.QuaestaInstruments.com/api/{Resource} -H "{arg1}: {arg1Value} -H "{arg2}: {arg2Value}"
Whether you use headers or URL-based arguments, both will be processed on on the server-side. It's a matter of user preference.
Get the raw, binary data from the dataloggers. This call is discouraged except for knowlegable users, as the data will require manual unpacking.
Arguments:
curl -X GET https://crns.QuaestaInstruments.com/api/raw \
-H "API_KEY: {...}" \
-H "Start_Date: {...}" \
-H "End_Date: {...}" \
-H "IMEI: {...}" \
-H "Type: JSON"
Get environmental sensor data from your CRNS system. This endpoint will default to /all, but more specific data can be specified with the following sub-endpoints:
Arguments:
curl -X GET https://crns.QuaestaInstruments.com/api/sensors \
-H "API_KEY: {...}" \
-H "Start_Date: {...}" \
-H "End_Date: {...}" \
-H "IMEI: {...}" \
-H "Type: JSON"
Get data related to the Neutron Pulse Monitors at the system. This endpoint will default to /all, but more specific data can be specified with the following sub-endpoints:
Arguments:
curl -X GET https://crns.QuaestaInstruments.com/api/npm \
-H "API_KEY: {...}" \
-H "Start_Date: {...}" \
-H "End_Date: {...}" \
-H "IMEI: {...}" \
-H "Type: JSON"
Get status information from a specified DL2200 datalogger.
Arguments:
curl -X GET https://crns.QuaestaInstruments.com/api/dl2200 \
-H "API_KEY: {...}" \
-H "Start_Date: {...}" \
-H "End_Date: {...}" \
-H "IMEI: {...}" \
-H "Type: JSON"