Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create simple API to access locations of adopted drains #236

Open
4 tasks done
jasonlally opened this issue Apr 19, 2017 · 4 comments
Open
4 tasks done

Create simple API to access locations of adopted drains #236

jasonlally opened this issue Apr 19, 2017 · 4 comments

Comments

@jasonlally
Copy link
Contributor

jasonlally commented Apr 19, 2017

Use case: users want to have ad hoc access to what specific drains are adopted so they can map them or integrate them with other data.

Proposed acceptance criteria

  • Admin user can access adopted drains at a single endpoint like https://adoptadrain.sfwater.org/api/drains/adopted
  • Data returns in json or csv based on parameter something like ?format=csv, default json
  • Endpoint returns only the latitude, longitude and City ID (prepended with N-), no adopter information
  • Basic authentication allows only users with admin roles on the platform to access the endpoint

Notes
Trying to keep this as narrowly scoped as possible to be simple but still useful. We could do other api methods, but this seems to be a valuable export option that doesn't introduce complex authentication scenarios.

cc/ @jeanwalshie @jafowler49 @jszwedko

@ghost
Copy link

ghost commented Apr 20, 2017

I'll make a REST API for this purpose. I'd think we'd need some sort of authentication, as that is the standard for most public APIs.

@ghost ghost self-assigned this Apr 20, 2017
@jasonlally
Copy link
Contributor Author

jasonlally commented Apr 22, 2017

@jafowler49 Thanks! Yeah, I didn't mean to imply no authentication, just that we can keep it simple since we won't have to have multiple levels of access.

For a first iteration, we can probably just assign access to those with admin roles and use basic authentication over TLS (the server has a ssl certificate).

If we get a basic endpoint, then DataSF could just leverage our automation platform to pick up and sync the data to the open data portal. Access to data, including handling load is handled then by the vendor of the open data platform.

Let me know if you have any questions.

@jszwedko
Copy link
Member

👍 I think using user authentication will be the simplest for now (we can introduce the concept of other authentication mechanisms like API tokens later if needed).

Pagination will probably be a must for this given the size of the data.

@ghost
Copy link

ghost commented May 2, 2017

pull request for this feature opened @ #241

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants