Should API routes be revolving around chapters
See original GitHub issue@timmyichen, @Zeko369, @nik-john, @allella I was looking at the api routes and I realized that the routes are revolving around chapters
. What if an organization doesn’t have a chapter?
Just, for example, assume we have Coders.org
as an organization and they don’t want any chapters under them, they host events under the organization’s name. In that case, our routes will return 404, right? I think we should include /events, /events/eventId and so on as routes. What do you all think?
_Originally posted by @vkWeb in https://github.com/freeCodeCamp/chapter/pull/162#issuecomment-554988089_
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Best Practices for Designing a Pragmatic RESTful API
Many of the API design opinions found on the web are academic discussions revolving around subjective interpretations of fuzzy standards as ...
Read more >REST API Tutorial - API Route - YouTube
https://www.turbo360.co/tutorialshttps://www.turbo360.co/tutorial/creating-a-rest-apiIn this video, we connect the API route such that it ...
Read more >RESTful API Design Patterns and Best Practices | Kong Inc.
An API designed according to the principles of REST can be built on any platform. These days, RESTful design revolves around four major...
Read more >Chapter 9. REST API design and layered service architectures
The API layer is in charge of dealing with throttling, paging, caching headers, parsing request bodies, and preparing responses. All of that, ...
Read more >Routes and Endpoints | REST API Handbook
A route is the “name” you use to access endpoints, used in the URL. A route can have multiple endpoints associated with it,...
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
This is a good question, though I would agree with still making everything run through the Chapter-based schema, even if there’s only 1 chapter in an organization.
I feel it’s easier to hide or tweak things in the UI, for example hiding the “Chapters” menu link if there’s only 1 Chapter, then it is to have a secondary pattern / API to support single-Chapter organizations.
@allella Yes, that would be better instead of tweaking the whole API structure.