How To Design Amazing REST APIs

  Рет қаралды 21,299

Amichai Mantinband

Amichai Mantinband

Күн бұрын

Пікірлер: 35
@axelandru9346
@axelandru9346 16 күн бұрын
I love the way you are teaching. You are a master !
@ryan-heath
@ryan-heath 8 ай бұрын
Very concise and high quality. Love it!
@carlcodes8422
@carlcodes8422 8 ай бұрын
Love this video Amichai, very concise, and a great refresher for everyone!
@lucaciandrei
@lucaciandrei 8 ай бұрын
Yes, finally, more.
@akitoueu
@akitoueu 8 ай бұрын
Nice content!! Can't wait for more of this!
@xelaksal6690
@xelaksal6690 7 ай бұрын
Just the best summary of the API best practices! Thanks!
@DamirSecki
@DamirSecki 8 ай бұрын
Great video! But missing important PATCH? Also woulde be important mentioning authorisation... with userId, where do we handle this (HEADER - usually with bearer token) and how to handle the not authorised response ... but in all, very quick, to the point video... cheers!
@javadmh7827
@javadmh7827 4 ай бұрын
Nice Stuff, Keep it going man
@Whojoo
@Whojoo 8 ай бұрын
Quick question, why was Patch skipped? I don't think it was mentioned in the video and it is a http method I see being used by several applications by different companies.
@amantinband
@amantinband 8 ай бұрын
I talked about it briefly but ended up cutting it due to time constraints
@stephenyork7318
@stephenyork7318 8 ай бұрын
Whenever I’ve worked somewhere building REST APIs we always avoided patch, seems to be hard to get right when ultimately PUT is adequate.
@hakura88
@hakura88 8 ай бұрын
@@stephenyork7318 we skip patch too, because we don't care that the complete resource is updated
@Tarabass
@Tarabass 7 ай бұрын
​@@stephenyork7318 in my 25 years of consuming rest api's I never used a patch endpoint. Mostly post, sometimes put..
@kipfitpal
@kipfitpal 7 ай бұрын
​@@stephenyork7318 PATCH isn't at all hard to get right. It's actually more flexible and effective than PUT.
@bartlomiejuminski
@bartlomiejuminski 8 ай бұрын
quality video thank You
@frimen310
@frimen310 7 ай бұрын
0:57 URI 3:53 GET method 7:10 POST method 8:29 PUT method 11:19 DELETE method 12:29 Idempotency of methods 15:13 Safety of methods 16:30 Status codes
@diegoborbadev
@diegoborbadev 7 ай бұрын
Amazing video!
@averrows
@averrows 7 ай бұрын
Amazing video
@tehmoros
@tehmoros 8 ай бұрын
I'm having doubts about DELETE being idempotent. It's counterpart (POST) is not, as it creates new entities, so unless you're soft-deleting (so basically - updating some deletion timestamp - a common practice) an entity, DELETE will not be idempotent. It will remove the entity on the first request, responding 204 and it should do nothing on the second request (with the same ID), returning 404, as it shows the true state the server is in after the first request. Different states and responses on the first and next requests for the same parameters. EDIT: For anyone confused, as I was: with DELETE the idempotency is kind of "delayed". The first request changes the server state, as it should, but the subsequent requests with the same ID parameter will not change the server state (as in: will not add/remove entities). In that way DELETE is idempotent. "Soft-delete" should still be treated on the same level as UPDATE request, though.
@sauliustb
@sauliustb 8 ай бұрын
Nice overview, but this raises a question for me: If you should use plural nouns and some level of nesting, given a game, should moves for a player in a specific game then be POSTed to /games/{gameId}/players/{playerId}/moves, or should you do a POST to /moves with a json in the request body? Functionally both would work, but I can't figure out which is dogmatic..
@Romlingen
@Romlingen 3 ай бұрын
Very nice video, thanks ! One question. How would you design an advanced search API towards a collection? Where you may have 20+ parameters. Can't put that into the URI.
@suhutwadiyo
@suhutwadiyo 8 ай бұрын
Mantappp
@el_nan1
@el_nan1 7 ай бұрын
may I ask what tool are you using for screen annotation? thanks!
@shahrukhqasim2770
@shahrukhqasim2770 8 ай бұрын
Is 201 created response okay if we are creating a collection of objects as the location header can only have the route for only one object created with the object's id but not the collection. Can you shed some light on it?
@timur2887
@timur2887 8 ай бұрын
Thank you very much! What app do you use to draw on screen?
@amantinband
@amantinband 8 ай бұрын
Presentify. If you’re on windows then ZoomIt is a good alternative
@timur2887
@timur2887 8 ай бұрын
@@amantinband thank you!
@ruekkart
@ruekkart 8 ай бұрын
Nice video! I'm thinking about DDD and CQRS integration. Is there any standard similar to REST but for task-oriented interfaces? Something like a task-oriented API? Or is it generally recommended to use just a task-oriented UI but a REST API under the hood?
@amantinband
@amantinband 8 ай бұрын
Not really. Perhaps gRPC is the closest. A common approach is implementing a "RESTful" API, but then converting the request internally to a command/query which is what's used to invoke the underlying task
@tchial0
@tchial0 8 ай бұрын
Finally
@SerafimMakris
@SerafimMakris 8 ай бұрын
if someone ask me to explain the http again i will send it this url without subject or title. :D :D Tnx. Amichai for the content.
@muczos
@muczos 8 ай бұрын
Would be nice to have PATCH auth etc ... :
@tomazkoritnik4072
@tomazkoritnik4072 8 ай бұрын
With REST API design I always ask myself "why oh why?". Why using it, when there are so much simpler solutions. I use JsonRPC and is so much simpler, so much easier to understand and so much more natural to use. So, why? Don't get me wrong, one can build really bad APIs with RPC, therefore the API design is VERY important. I usually try to design APIs where a RPC request always targets an object. It's like calling an action on an object from the domain model. I think that HTTP is abused in REST and that API design is adapted to fit to HTTP instead of adapting API design to our domain. There is simply too much mapping needed between domain code and API code in REST and requires lots of documentation to understand it. We developers have more than enough complexity elsewhere to deal with. Also all mentioned for REST apply also to RPC: nesting, versioning, idempotency, even HATEOAS.
@Eirenarch
@Eirenarch 8 ай бұрын
I disagree with the /products/{productId}/reviews/{reviewId} URL. If you have reviewId it goes under /reviews/{reviewId}. Why make the user provide 2 different IDs? What happens if they mismatch? Why allow a situation where we need to answer these questions at all?
The Best Way To Send HTTP Requests
9:20
Amichai Mantinband
Рет қаралды 50 М.
Stop Calling Your API a "REST API"
17:42
Amichai Mantinband
Рет қаралды 19 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Deep Dive into REST API Design and Implementation Best Practices
12:02
Software Developer Diaries
Рет қаралды 72 М.
Exceptions are evil. This is what I do instead.
24:41
Amichai Mantinband
Рет қаралды 23 М.
The Right Way To Build REST APIs
10:07
Awesome
Рет қаралды 120 М.
Top 8 Best Practices for API Design #api #bestpractices #apidevelopment
15:23
SWE with Vivek Bharatha
Рет қаралды 9 М.
Controllers From Scratch Using .NET 8
14:23
Amichai Mantinband
Рет қаралды 16 М.
Rest API - Best Practices - Design
15:50
High-Performance Programming
Рет қаралды 117 М.
Stop returning custom error responses from your API. Do this instead.
12:07
Amichai Mantinband
Рет қаралды 87 М.
Good APIs Vs Bad APIs: 7 Tips for API Design
5:48
ByteByteGo
Рет қаралды 258 М.
5 C# Naming Conventions I Wish Everyone Followed
12:46
Amichai Mantinband
Рет қаралды 19 М.
The Most Important Design Pattern in React
35:04
Cosden Solutions
Рет қаралды 126 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН