REST API Interview Questions (Beginner Level)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to talk about nine common rest API interview questions my name is Kevin way I'm a product manager and I'm here to help you land your dream job in Tech [Music] rest apis are some of the most prominent software architectures among web services having a strong understanding of this architecture and its applications is critical to passing your software engineering interview I'll be taking you through nine common rest API questions and answers to help you review some topics in Acer interview question one how are rest apis stateless to answer this question we need to First understand the meaning of statefulness and statelessness an application API or web service that is considered stateful stores data from the client on its own servers for example if a username and password were passed from the client to the server as a form of authentication and the server stores that data then the web server is stateful this is because the server is now storing data from the client on the other hand the rest architecture requires that the client states is not stored on the server instead each request made by the client must contain all necessary information for that particular HTTP method so that's how rest apis are stateless before we jump into the next question if you enjoy these Tech interview videos be sure to subscribe and hit that like button for the YouTube algorithm we put a lot of effort into these videos with the goal of helping as many people as possible so your like or comment is really helpful to show your support alright on to question number two explain the HTTP methods restful web services will use HTTP methods and client requests the most common methods are get post put and delete get fetch is a resource from the server post requests for a resource to be created on the server put requests for a resource to be updated delete requests for a resource to be deleted these four methods correspond to crud operations or create read update and delete question three explain the HTTP status codes restful web services use HTTP status codes in server responses the most common types of status codes are 200 codes which represent a successful request and response 400 codes represent a client-side error and 500 codes represent a server-side error what is a URI URI stands for uniform resource identifier it identifies every resource in the rest architecture a URI can be one of two types urn which identifies a resource through a unique and persistent name like a books ISBN and URL which is your typical web address on the web URLs will typically be used when designing rest apis question 5 what are some best practices in making the URI for a restful web service Uris should be mostly standardized When developing a restful web service this way clients can more easily work with the web service here are five best practices when making restful Uris develop them with the understanding that forward slashes indicate hierarchy use plural nouns for branches use hyphens for multiple words use lowercase and refrain from using file extensions question six what are the differences between rest and soap well rest is an architecture used to develop web services soap or simple object access protocol serves as a protocol for exchanging structured information by way of apis while rest has flexible standards soap standards are much more strict in that their implementation and statefulness often means that the client and server are closer connected additionally while rest allows for data transfer in Json XML and others soap only supports XML in general soap is a stricter and more Niche alternative to rest it's used in cases where more regulated and staple data needs to be transferred question number seven what are the differences between rest and Ajax Ajax refers to asynchronous JavaScript and XML is a collection of web technologies that allow for asynchronous web applications using the built-in XML HTTP request object while rest API refers to an architecture for handling HTTP requests Ajax refers to a collection of web Technologies for making asynchronous web requests this means that a rest API may handle Ajax clients and that Ajax may be used to send restful requests but a rest API could never be implemented nor replaced by Ajax question 8 what are some tools used to develop and test rest apis the tools used to develop rest apis depend on the language used different tools exist depending on whether the language is Java node.js python etc for example in the case of node.js Frameworks like Express are commonly used for testing there are a few commonly used tools like Postman which is used to ensure resources are being delivered and each facet of a rest API is performing as designed question 9 what are some real world examples of rest apis rest apis can be seen in nearly every facet of the web by going to the exponent website there is a get request sent to a server at the URL for the necessary HTML to display to the client most commonly as a developer rest apis are used to manipulate data from a particular database using the four main HTTP methods operations like retrieving file data accessing images and even hosting a website all require use of rest apis now to wrap up this video let's discuss the pros and cons for restful web services advantages include rest apis being easy to learn there being a wide range of data transfers like Json and XML statelessness allowing for a simpler client experience and skill ability due to the independent nature of client and server disadvantages include sessions not being able to be maintained because of statelessness a lack of built-in security measures the need to be versioned for backwards compatibility when being updated and consistency and Uris being increasingly difficult to maintain for complex projects I hope this video helped refresh your memory of rest apis and give you a good indication of common questions you might be asked and for more Tech interview prep content exponent has the best resources to help you Ace your interview including in-depth interview courses private coaching and a community of experts ready to help you prep for even the toughest questions go to try exponent.com to become a member today thanks for watching foreign [Music]
Info
Channel: Exponent
Views: 18,634
Rating: undefined out of 5
Keywords: yt:cc=on
Id: faMdrSCVDzc
Channel Id: undefined
Length: 7min 7sec (427 seconds)
Published: Thu Sep 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.