Curl Command Examples for the Aqualus Water API
It is recommended that an API User be created to allow the API key to be set and used, to limit the chances of accidental key changes by a standard user. An email address will be required to set the password for the user and obtain the API key in the first instance.
To suit your instance, the below commands would only need the URL and API key changed:
e.g. - change
YOURAQUALUS to your instance name, and
202BB207-D226-XXXX-A340-9822CE9D87B3 to your API key
Also please note that you can change the application type from JSON to XML in the Application Type, and output via -O or -o to the filename/type of your choice.
More information and details can be found at https://YOURAQUALUS.aqualus.com/Documentation/Api/Swagger/index.html
The below is not an exhaustive list of API endpoints, only the most common. Please use the Swagger docs linked above for all possible options.
Assessments:
curl -X GET https://YOURAQUALUS.aqualus.com/api/v1/companion/assessment/list -H "accept: application/vnd.api+json" -H "Authorization: <YOUR_API_KEY>" -o assessment-data.json
Customers:
curl -X GET https://YOURAQUALUS.aqualus.com/api/v1/companion/customer/list -H "accept: application/vnd.api+json" -H "Authorization: <YOUR_API_KEY>" -o customer-data.json
Customer Associations:
curl -X GET https://YOURAQUALUS.aqualus.com/api/v1/companion/customerAssessmentAssociations/list -H "accept: application/vnd.api+json" -H "Authorization: <YOUR_API_KEY>" -o customer-assessment-associations-data.json
Properties:
curl -X GET https://YOURAQUALUS.aqualus.com/api/v1/companion/property/list -H "accept: application/vnd.api+json" -H "Authorization: <YOUR_API_KEY>" -o property-data.json
Meters:
curl -X GET https://YOURAQUALUS.aqualus.com/api/v1/companion/meter/list -H "accept: application/vnd.api+json" -H "Authorization: <YOUR_API_KEY>" -o meter-data.json
Advices:
curl -X PUT "https://YOURAQUALUS.aqualus.com/api/v1/advice/list/" -H "accept: application/vnd.api+json" -H "Authorization: <YOUR_API_KEY>" -H "content-type: application/json" -d "{}" -o advices-data.json