Code Samples

https://api.onegov.nsw.gov.au/oauth/client_credential/accesstoken

The client can request an access token using only its client credentials (or other supported means of authentication) when the client is requesting access to the protected resources under its control, or those of another resource owner that have been previously arranged with the authorization server.

https://api.onegov.nsw.gov.au/waternsw-waterinsights/v1/dams

Returns a list of all dams managed by WaterNSW, their numeric identity, location and maximum accessible capacity in megalitres.

https://api.onegov.nsw.gov.au/waternsw-waterinsights/v1/dams/{dam_id}

Returns the location and maximum accessible capacity in megalitres of the dam identified by dam_id

https://api.onegov.nsw.gov.au/waternsw-waterinsights/v1/dams/{dam_id}/resources

For a dam identified by dam_id, returns the accessible volume in megalitres, the accessible volume as a percentage of maximum accessible volume and the volume flowing into and released from the dam in megalitres for every month from the “from” date to the “to” date. A month in the payload is denoted by a date of the first day of the month but they are monthly values, not daily values. A “from” or “to” date on any day in a month will be taken to mean that that month is required (the day is not important).

https://api.onegov.nsw.gov.au/waternsw-waterinsights/v1/dams/{dam_id}/resources/latest

For a dam identified by dam_id, returns the current month’s accessible volume in megalitres, the accessible volume as a percentage of maximum accessible volume and the volume flowing into and released from the dam. A month in the payload is denoted by a date of the first day of the month.