REST API Interview Questions (Advanced Level)

preview_player
Показать описание


In this video, Kevin Wei explains the answers to some of the most common advanced REST API interview questions for developers. We cover payloads, REST messaging, HTTP requests and methods.

Chapters -
00:00 - Introduction
00:30 - What is the difference between PUT, POST, and PATCH?
01:22 - What is a payload in the context of a REST API?
01:47 - What is a REST message?
02:11 - What are the core components of an HTTP request?
02:59 - What are the core components of an HTTP response?
03:49 - What is an idempotent method and why are they important?
04:32 - What's the difference between idempotent and safe HTTP methods?
04:51 - Explain caching in a RESTful architecture?
05:21 - Best practices in developing a RESTful web service

Watch more videos here:

ABOUT US:
Did you enjoy this interview question and answer? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others.

Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!

#softwareengineering #restapis #soapapi #uri #ajax #javascript #xml
Рекомендации по теме
Комментарии
Автор

0:30 #1 What is the difference between PUT, POST and PATCH?
1:22 #2 What is a payload in the context of a REST API?
1:47 #3 What is a REST message?
2:11 #4 What are the core components of an HTTP request?
2:59 #5 What are the core components of an HTTP response?
3:49 #6 What is an idempotent method and why are they important?
4:32 #7 What is the difference between idempotent and safe HTTP methods?
4:51 #8 Explain caching in a RESTful architecture

Boringpenguin
Автор

For "advanced", I'd expect more from the question on the difference between PUT, PATCH, and POST. POST requests the server create a new resource and respond with its newly created URI.
PUT and PATCH will update, or MAY create, a resource at a specific URI. The difference being PUT replaces (overwrites) the resource and PATCH simply updates specific properties.
It's important to note that PUT is the only true idempotent action of the three. PATCH may be idempotent but not always.
It's also important to note that on PUT and PATCH operations, if the resource doesn't exist, the server MAY create the resource, but doesn't have to. This just depends on whether the service requires it creates URIs via POST or is OK with UTIs being created by PUT and PATCH requests. If the latter, handlers of those requests should validate if all fields required to create a resource are present before it creates the resource should it not exist.
Most importantly, API developers should stop treating PUT like a PATCH operation which seems like common practice because GET, POST, PUT, and DELETE operations are too commonly likened to CRUD operations without the explanation of the differences.
HTTP requests are an operation on the resource at a URI, not the datasource. It's not a 1:1 CRUD pass-through to the datasource, especially since URIs represent more than data in a datasource.

snavesinned
Автор

Short and sweet, love the fromat of your videos and thank you all the effort you put into them.

laponiec
Автор

Awesome!! Precise defination. On point explanation

shrashetty
Автор

Thanks bro, you explained very efficiently, keep working...

suvrojyotibhuniya
Автор

Thank you for answering these type questions…. I understand some people here in the comment section telling these are not advanced questions but people like me are still getting to know answers to these type of questions and they are useful..thank you..keeping making videos 🙏

ArpithaIndira
Автор

You are awesome! Keep up the great work💯

biancastefania
Автор

Best practices
1. Supporting JSON data transfer
2. Using proper status codes
3. Using URI hierarchy to represent the relationship between resources
4. Using idempotent HTTP methods
5. Using caching
6. Incorporating security measures

khushishareef
Автор

I wish I got these questions in an interview 😂

TKGZONE
Автор

Great video! I did have a question, though: how does caching work when RESTful APIs are supposed to be stateless? Doesn't that violate that principle?

dirktrash
Автор

what is meta data at 5:10 ? can anyone explain it ??

rhishishranjan
Автор

You said PUT is updating existing resource at 0:39, but in 1:00 you say PUT is replacing the entire resource vs PATCH. Seems contradicting

rnrnrkrk
Автор

im assuming the first question is to make sure the resume wasnt a lie lmao

stickysteve
Автор

Good explanation, but this is not advanced level...

mysterio
Автор

You should not do clickbait by saying Advanced Questions and just state plain basics.

aaqibhamdule
Автор

Exponent is fake. You say advanced and talk about what is payload and all of your mock interviews are crap with bs candidates who are amateurs..

Nexatek
welcome to shbcf.ru