Designing /api/v2
See original GitHub issueAfter discussing with Peter on Slack, let’s start a discussion about what v2 might look like:
These are the endpoints we have now:
/chrom-sizes/
/uids_by_filename/
/tilesets/
/tileset_info/
/tiles/
/register_url/
If this were RESTful, how many resources would there be? I think there’s just 3:
/chrom-sizes/
or/coord-systems/
/tilesets/
/tiles/
/register_url/
ideally should be some kind of POST request to /tilesets/… a way to register a new remote tileset.
/tileset_info/
would just be a GET request to /tilesets/
with a id parameter
/uids_by_filename/
would just be a different GET request to /tilesets/
Thoughts?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Best practices for REST API design - Stack Overflow Blog
In this article, we'll look at how to design REST APIs to be easy to understand for anyone consuming them, future-proof, and secure...
Read more >RESTful web API design - Best Practices - Microsoft Learn
Learn the best practices for designing web APIs that support platform independence and service evolution.
Read more >Best Practices in API Design - Swagger
Good API design is a topic that comes up a lot for teams that are trying to perfect ... API include: improved developer...
Read more >How to write and design good API documentation
API reference is a visual representation of the API. It documents all possible requests and responses that exist within this API which you,...
Read more >Official API Design Guide - Stoplight
Well-documented APIs are more likely to have higher adoption and better user experience. API documentation is one critical component to good design. There...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Even putting v2 aside, maybe we should have a proper API reference for all v1 endpoints (http://docs.higlass.io/higlass_server.html#api)
Does use of tilesets?ac=foo do the same as uids_by_filename?
$ curl -qL “http://127.0.0.1/api/v1/tilesets?ac=foo” | jq .results[0].uuid “Vuol_ez-QlO98FsSgtwLyQ”
I didn’t know that tilesets could point to the same filename. I thought that ingesting a tileset adds a suffix if the filename already exists.
Non-RESTful utility endpoints are helpful. Using filter options with existing endpoints works, too, but the higlass API documentation might lack some detail on these (https://docs.higlass.io/higlass_server.html#api). It is definitely helpful to be able to get UUIDs from filenames for my use case, but I had to dig into the higlass-server code to find other filter options.
I don’t have much useful to add to the v2 discussion, but thought a perspective from the user side about endpoints might be helpful.
On Tue, May 7, 2019 at 10:06 AM Peter Kerpedjiev notifications@github.com wrote: