Tech Point Fundamentals

Sunday, October 17, 2021

Most Frequently Asked Web API Interview Questions

Most Frequently Asked Web API Interview Questions

Web-API-Interview-Questions

A Web API is an application programming interface for the Web. API is some kind of interface that has a set of functions that allow programmers to access specific resources/features or data of an application, operating system, or other services.


Web API is based on true REST Principles and can be accessed over HTTP protocol. It is a concept and not a technology. We can build Web API using different technologies such as Java, .NET, etc.


Web API is the most frequent topic for the interview today. In this article, we will see the most frequently asked Web API Interview Questions.


Please visit our Youtube Channel for more Interview Questions and Answers videos by the below link:







Below are the Most Common Interview Questions based on the Web API:


Q01. What are the REST Principles?


Q02. What is the difference between REST and RESTful?


Q03. What are the RESTful Services?


Q04. What is REST API? How it is different from RESTful Services?


Q05. What are the advantages of using REST in Web API?


Q06. What is SOAP? What are the advantages of SOAP?


Q07. What is the difference between REST and SOAP?


Q08. What is the difference between Web API and WCF Services?




Q09. What is Web API? What are the advantages of Web API?


Q10. What is the Web API Request Life Cycle?


Q11. What are the different HTTP Verbs?


Q12. What is HTTP protocol and how it is different from HTTPS?


Q13. How can you enable HTTPS in Web API?


Q14. What is the difference between MVC and Web API?


Q15. Can you return a View from Web API? or How can you return a View from the ASP.NET Web API method?


Please watch How View Engine finds the View in MVC video here.


Q16. Is it true that ASP.NET Web API has replaced the WCF?




Q17. Is it possible to create RESTful services using WCF?


Q18. Why Web API, if you can implement REST with WCF also?


Q19. What are the different protocols supported by Web API?


Q20. What are the common HTTP Status Codes?


Q21  What is the difference between the 200 and 201 HTTP status codes? or If 200 is for all successful operations then why do we have 201 Response Codes? 


Q22. What is the difference between PUT and POST?


Q23. What do you mean by idempotent operation? Which HTTP operation is idempotent?




Q24. Can an HTTP request be mapped to the action method without using any HTTP attribute?


Q25. What are the different result formats that a Web API can return?


Q26. What is Content Negotiation in Web API?


Q27. How to return only JSON from ASP.NET Web API Service irrespective of the Accept header value?


Q28. What is the NonAction Attribute in Web API?


Q29. How can you pass multiple complex types in Web API?


Q30. What is the use of the FromUri attribute in Web API?


Q31. How can you force the Web API action method to receive the model parameter from URI?




Q32. What is the use FromBody attribute in Web API?


Q33. How can you force the Web API action method to receive the parameter from Body?


Q34. What is the difference between FromURI and the FromBody attribute in Web API?


Q35. What is Media-Type Formatter in ASP.NET Web API? or What are the different Formatters in Web API?


Q36. What is the default Media Type Formatter in Web API?


Q37. What is Media-Type Mapping in ASP.NET Web API?


Q38. What is the difference between Web API 1.0 and Web API 2.0?


Q39. What is the difference between URI, URL, and URN?




Q40. What is the difference between Query Param and URI Param?


Please watch the URI PARAM vs QUERY PARAM video here.


Q41. What are “Under-Posting” and “Over-Posting” in Web API?


Q42. What are the UnderPosting and OverPosting Anomalies of REST?


Q43. What is the difference between input validation and property validation?


Q44. What are the different ways to pass parameters in Web API?


Q45. What is Parameter Binding in ASP.NET Web API? 


Q46. What is the default binding behavior of Web API?


Q47. How parameter binding works in Web API? How it differs from MVC?




Q48. What is the use of the “IValueprovider” interface in Web API?


Q49. What is the difference between Model Binders and Formatters? What does the Web API use?


Q50. What are Model Binder, Value Providers, and Formatters in Web API?


Q51. How can you create a Custom Formatter in Web API?


Q52. Can you overload the Web API Action Method? How?


Please watch the Action Method Overloading video here.


Q53. What are the different Action Results (return types) supported in Web API?


Q54. What is the biggest disadvantage of "Other Return Types" in Web API?


Q55. What is the difference between ApiController and Controller?




Q56. Can you write Web API in the MVC controller also?


Q57. What is the difference between MVC Routing and Web API Routing?


Q58. What is Web API Routing? Why “api/” segment is used in Web API routing?


Q59. Is it possible to have an MVC kind of routing in Web API?


Q60. What is Attribute Routing in ASP.NET Web API? How can you enable and define Attribute Routing in ASP.NET WEB API?


Q61  What are the different Versioning Mechanisms in Web API? or What are the different ways to achieve Web API Versioning?


Q62. What is Azure API Manager?


Q63. How can you change the Web API action method name without changing the actual name in the code? or What is the use of the ActionName attribute?




Q64. Can you use IHttpActionResult with HttpResponseMessage?


Q65. What are the different ways to handle errors in web API?


Q66. How can you secure your API Services? or Which types of authentication have you implemented in your API?


Q67. What is Token-Based Authentication or Bearer Token Authentication in Web API?


Q68. What is JWT Authentication?


Q69. How can you manage sessions in Web API?


Q70. What are the different action filters supported in web API? What is their execution order?


Q71. What are the different levels to register the custom filters?




Q72. What is the use of the Global.asax file in Web API?


Q73. How can you serialize the read-only properties of the Model?


Q74. How can you return the Microsoft JSON date format ie “/Date(823458600000+0530)” from all the Web APIs?


Q75. How you can implement the indentation in JSON in Web API response?


Q76. What is the use of “IgnoreDataMember” or “JsonIgnore” in Web API?


Q77. In which .NET framework Web API was introduced?


Q78. What is the difference between SOAP services and Web Services?


Q79. What is the difference between Web API and Web Services?




Q80. What is the difference between Web API and WCF Rest Service?


Q81. What is the difference between Monolithic and Micro Services Architecture


Q82. What is HTTP Content? What are the different components of it?


Q83. What are the core components of an HTTP Request?


Q84. What are the core components of an HTTP Response?


Q85. Can we consume ASP.NET Web API in applications created using other than .NET?


Q86. What is JSON in Web API? What is the difference between JSON and XML?


Q87. What is BSON in Web API?




Q88. What is oData in ASP.Net Web API?


Q89. What is OWIN Self Hosting?


Q90. What is the caching mechanism in Web API?


Q91. What is a Swagger in Web API?


Q92. What is the CORS issue in Web API? How can you resolve this issue in Web API?


Q93. What is OWIN and why need it?


Q94. How can you generate the API documents from the existing Web API in .Net? 





Watch our related videos here


Recommended Articles


Most Frequently Asked SQL Interview Questions
Most Frequently Asked C# Interview Questions
Primary Key Interview Questions
Unique Key Interview Questions
Derived Table (DT) Interview Questions
Unicode vs Non-Unicode Data Types Interview Questions
Table Variable (TV) Interview Questions
Table-Valued Type (TVT) Interview Questions
Common Table Expression(CTE) Interview Questions
Temp Table Interview Questions
Static Class Interview Questions and Answers
Sealed Class Interview Questions and Answers
Sealed Method Interview Questions and Answers
Abstract Class vs Interface
Interface Interview Questions and Answers





Thanks for visiting this page. Please follow us on Twitter, Facebook, LinkedIn, Telegram, WhatsApp, Youtube, and Quora for regular updates.

1 comment:

  1. Hi, Can you please share answers of all above questions? If you share then it would be greate help. Thanks!

    ReplyDelete

Please do not enter any HTML. JavaScript or spam link in the comment box.