22
votes
Accepted
How to design for API use cases that need different data from the same table?
In the end, there is no "right" or "wrong" in this situation, so my advice can only be on a very general level.
You seem to be falling into the trap of leaking a certain design ...
7
votes
How to design for API use cases that need different data from the same table?
For this answer I assumed that the terms tournament_id and event_id are equivalent, although you didn't state that explicitly in your question.
As mtj pointed out in their answer you shouldn't design ...
5
votes
How to design for API use cases that need different data from the same table?
Essentially you need three endpoints. Not worrying about the paths for now we have..
GetPlayerById?id=
Returns a single player by id for the player info page.
GetPlayersInATournament?tournamentId=
...
4
votes
Accepted
Designing a Role-Based Permission System for FastAPI: Integer Roles vs Database Roles?
In the context of microservices, neither of the options you presented is viable.
Microservices are meant to be independently deployable, which means that it must be possible to deploy a new version of ...
1
vote
What is the best way to comment a deprecated class in Java?
What you do not do is remove any documentation.
Think about it: The class is deprecated so I want to replace all its uses. And I want to do that without breaking anything. To replace uses of the class ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
api × 1312rest × 421
api-design × 374
design × 106
architecture × 102
web-api × 87
java × 71
c# × 61
web-services × 58
design-patterns × 56
http × 52
security × 50
microservices × 50
authentication × 48
json × 47
php × 46
web-applications × 46
database × 44
javascript × 41
web-development × 36
python × 32
programming-practices × 24
.net × 22
libraries × 22
c++ × 21