What is API?

What is API?

API stands for application programming interface, it hides the complexity from developers, extend systems to partners, organize code, and create reusable components

API is a way to programmatically interact with a separate software component or resource. It applies everywhere from command-line tools to enterprise Java code. Unless you write every single line of code from scratch, you’re going to be interacting with external software components, each with its own API.

If you developing application from scratch, a well-designed software application will have internal APIs to help organize code and make components more reusable.

It is a way of organizing the complexity of a system so that complicated actions can be handled in a simple way. APIs are an essential component of software design and they exist at every level of the software stack


Api Design Approach

Well-designed APIs support efficient, fluid, adoption and easy to use.

API design is the process by “what” and “how” of an API are formulated. Well-designed APIs have consistent behaviour to take their context and keep the needs in developer mind. Adhering to commonly accepted best practices and taking inspiration from other APIs that your developers will be familiar

For Example:

If you are building a library that provided a new kind of List to your java application and it was designed to work with particular features. The API of that List is having a “add” method it should behaves in the same way the Java List “add” method works. This is helpfully to users can easily adopt your library because they already know how to use it.


REST APIs

Web services were originally designed to communicate using SOAP (Simple Object Access Protocol), a messaging protocol that sends XML documents over HTTP. Today, however, most web-based APIs use REST (Representational State Transfer) as an architectural style.

APIs are typically categorized as either SOAP or REST and both are used to access web services. SOAP relies exclusively on XML to provide messaging services, while REST offers a more lightweight method, using URLs in most cases to receive or send information. REST uses different HTTP verbs (GET, POST, PUT, PATCH and DELETE) to perform tasks.

REST is a set of architectural components, design principles, and interactions used for building distributed software’s. It’s is a way of developing software applications that allows for flexible communication and display of information across the web and providing.

REST involves sending data to the requesting application, this provides great flexibility and allowing the application to do whatever it wants with the data. It comes in the cost of efficiency to send/receive the data over the web for processing is fast compared to doing the processing by using SOAP.


REST API Design Approach

A model of the data has to manipulated by the API and resources of the API will be determined from data model. Each resources representations supported by the APIs have to be determined.

Resources must be named properly by means of URIs (Uniform Resource Identifiers) and each URI’s specify the HTTP methods used to perform the required application functions have to be decided and it includes the use of applicable HTTP headers.

Special behaviour is required by the application (e.g. concurrency control, long running requests) has to be decided. Finally, the error situations have to be identified and corresponding error codes/messages has to be designed.


Mohanapandi Shanmugam

Digital Transformation | Senior Project Manager - SME in Banking & FinTech Solutions | Digital Payment Systems | Insurance | Retail Domains | Certified PRINCE2 Practitioner, Scrum Master, Product Owner & PMP Exam Prep

4 年

Good initiative Vadi

回复
OLADAPO OLATEJU (FIIM, CDOA)

M.IT, CERTIFIED INFORMATION SECURITY MANAGER (CISM), ISO 27001 LEAD IMPLEMENTER, ISO 22301 LI, CERTIFIED SCRUM MASTER (CSM), COBIT 5 IMPLEMENTER, COBIT 5 ASSESSOR, ITIL, HCD-LUMA PRACTITIONER, QUALYSGUARD CERTIFIED.

4 年

Very nice and enlightening publication from you Vadiv. Well done!!!

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了