Open sowdm opened 1 year ago
Need to get an API key here: https://data.cityofpaloalto.org/developers/
Will have to throw errors if user does not have it and tell them to get one
A typical request will look like this:
A few things to note in the request above:
/api/v2/datastreams/ This is an invoke request, that will return a json response. The entire resources descriptions are available in the API resource documentation.
GENER-RESID-WATER-SERVI-UTILI This is the GUID of the data stream you are accessing. You will always find this GUID in the Data Stream Details page, making a data stream search through the API, or in many other places.
auth_key=YOUR_API_KEY This is the key from step 1. You'll need it for every request.
Pagination: https://junar.github.io/docs/en/_sections/02-topics.html#pagination
Basic example: http://api.dev:8080/api/v2/datasets/?auth_key=576bba0dd5a27df9aaac12d1d7ec25c8411fe29e&limit=2&offset=2
Can also uses pages with limit: https://junar.github.io/docs/en/_sections/04-dataviews.html#results-per-page https://junar.github.io/docs/en/_sections/04-dataviews.html#results-per-page
Output types (data views): https://junar.github.io/docs/en/_sections/04-dataviews.html data.json gives data in JSON format
Data filtering: https://junar.github.io/docs/en/_sections/04-dataviews.html#filtering-data-view-results If data columns needs formatting prior to query (such as if date is not formatted properly: https://junar.github.io/docs/en/_sections/04-dataviews.html#data-column-formatting Data sorting: https://junar.github.io/docs/en/_sections/04-dataviews.html#data-sorting
https://data.cityofpaloalto.org/developers/