ProjectSidewalk / SidewalkWebpage

Project Sidewalk web page
http://projectsidewalk.org
MIT License
83 stars 24 forks source link

Add API endpoint for raw label data #3526

Closed misaugstad closed 6 months ago

misaugstad commented 6 months ago
Brief description of problem/feature

Our partners in Zurich are asking for this ASAP, and similar requests have been made in the past. It's about time I make a public API endpoint the just has all of our raw labels (minus the tutorial labels probably, but with a caveat on the API page) with as much metadata as I can think of to include. Now that we have a system figured out for querying data in batches so that we don't crash the server, I feel more comfortable doing this :)

Some of the metadata that should be included that isn't included in other API endpoints that we have:

  1. List of validators and whether they marked agree/disagree/notsure
  2. List of tags
  3. The base URL that can be used to request their own image from GSV
  4. Metadata related to CV

I essentially want to make a combination of the metadata from /labels/all, /v2/access/attributesWithLabels, and /adminapi/labels/cvMetadata, along with anything else I can think of that could be relevant.

Some other thoughts/questions:

  1. Do we provide GeoJSON, CSV, and Shapefile support for this API? I think that I'd lean towards yes, but it's certainly more work than solely providing a GeoJSON API...
  2. Do we allow lat/lng parameters to only query for labels in a bounding box? My initial thought is no: if they want the raw label data, just give them everything. Though it doesn't create that much more work for me... TBD.
misaugstad commented 6 months ago

While working through this there may also be a question of whether there should be an admin version created. Not sure if there is metadata we might want to include that should only be seen by admins. Also TBD.