What is application programming interface




















Developers can use web APIs to extend the functionality of their apps or sites. Most businesses use more than one API to connect applications and share information. Learn more about API management in our detailed article. The goal of API specifications is to standardize data exchange between web services. This protocol specifies the interaction between client-server based applications.

One program client requests data or functionality from another program server , located in another computer on a network, and the server sends the required response. RPC is also known as a subroutine or function call. One of two ways to implement a remote procedure call is SOAP. SOAP is a lightweight protocol for exchanging structured information in a decentralized, distributed environment, according to the definition by Microsoft that developed it.

Generally speaking, this specification contains the syntax rules for request and response messages sent by web applications.

Extensible markup language XML is a simple and very flexible text format widely used for data storage and exchange over the internet or other networks. XML defines a set of rules for encoding documents in a format that both humans and machines can read. The markup language is a collection of symbols that can be placed in the text to delineate and label the parts of the text document.

XML text documents contain self-descriptive tags of data objects, which makes them easily readable. Source: Google Ad Manager. SOAP is mostly used with enterprise web-based software to ensure high security of transmitted data. The World Wide Web is the most common realization and application of this architecture style. REST is considered a simpler alternative to SOAP, which many developers find difficult to use because it requires writing a lot of code to complete every task and following the XML structure for every message sent.

REST follows another logic since it makes data available as resources. The ability to support multiple formats for storing and exchanging data is one of the reasons REST is a prevailing choice for building public APIs these days.

Social media giants and travel companies provide external APIs to improve their brand visibility even more. If you consider redefining your travel and hospitality business offering, dive deep into the world of travel and booking APIs with our dedicated article. Since these are universal data structures, the format can be used with any programming language.

Source: OpenTable. With gRPC, the client application can directly call methods from a server application located on a different computer as if it was a local object. This makes it easier to create distributed services and applications. Here, the developer needs to first define the structure of the data they want to serialize. Once the data structures have been specified, they use the protocol buffer compiler to generate the data access classes in the programming language of your choice.

The data is then compressed and serialized in binary format at runtime. Learn more about gRPC in our detailed article.

Example of RPC method parameters and return types. Source: gRCP. The need for faster feature development, more efficient data loading due to increased mobile adoption, and a multitude of clients, made the developers look for other approaches to software architecture. It allows the client to detail the exact data it needs and simplifies data aggregation from multiple sources, so the developer can use one API call to request all needed data.

Another special feature of GraphQL is that it uses a type system to describe data. Apps using GraphQL control what data they need to fetch from a server, which allows them to run fast even when the mobile connection is slow. Well-written and structured API documentation that explains how to effectively use and integrate an API in an easy-to-comprehend manner will make a developer happy and eager to recommend the API to peers. The API documentation is a reference manual with all needed information about the API, including functions, classes, return types, and arguments.

Documentation may be static and interactive. The latter allows for trying out APIs and see return results and usually consists of two columns: human and machine. The human column contains API descriptions, and the machine one has a console to make calls and contains info that clients and servers will be interested in when testing the API.

Source: AMIS. An API is a way to programmatically interact with a separate software component or resource. Even if you do write something entirely from scratch, a well-designed software application will have internal APIs to help organize code and make components more reusable.

And there are numerous public APIs that allow you to tap into functionality developed elsewhere over the web. A few examples of Amazon Dash buttons. Order more detergent or paper towels at the press of a button. You order a Dash Button from Amazon and use an app on your smartphone to associate it with your Wi-Fi network, your Amazon account, and a product, say, your favorite brand of paper towels.

Then, whenever you want to order more paper towels, you just press the button. The Dash Button connects to the Internet and sends a message to place an order on your account.

A few days later, paper towels arrive at your doorstep. Like an API, the Dash Button is a blissfully simple interface that hides all kinds of complexity behind the scenes.

The ID of the product you ordered must be retrieved from some database. Your delivery address must be pulled from your account. The nearest fulfillment center stocking your paper towels must be determined, then notified to remove an item from the available stock and package it up.

Finally, the package must be routed through some combination of airplanes, trucks, and vans along with other packages in a way that ensures that all the packages will reach their destinations efficiently.

Now imagine you had to coordinate all of these things as a customer. Luckily, the whole ordeal is abstracted away from you. There is a long, interconnected chain of computer systems and human processes that make those paper towels show up at your doorstep, but all you have to think about is pressing a button. This is what APIs are like for programmers. They take an overwhelming amount of complexity and define a relatively simple set of interactions that you can utilize instead of doing it all yourself.

Traditionally, APIs were used to connect code components running on the same machine. These kinds of code mashups allow users to mix and match functionality from different vendors on their own systems. For instance, if you use the marketing automation software Marketo, you can sync your data there with Salesforce CRM functionality. You still need to be a Marketo and Salesforce customer for this to work. But the availability of these APIs makes integration a much simpler process than it otherwise would be.

All these companies leverage APIs for their interactions. Especially with Public APIs. Large tech companies, especially social media companies, frequently make their aggregate data available to the public. APIs are also maintained by government organizations, banks, healthcare organizations, conferences, publishing houses, software startups, fan groups, eSports leagues, and even individuals, to share anything from social media content to trivia questions, rankings, maps, song lyrics, recipes, parts lists, and more.

As I mentioned earlier, this is due to a couple of key changes in the industry. Discover more about API Management. Learn about successful API creation. Better governance, one API at a time.

Learn how to unlock your true business value with APIs. Save my name, email, and website in this browser for the next time I comment. Notify me of follow-up comments by email. Notify me of new posts by email. Sign in. What is API Integration? What is an API Catalog? What is an API Platform? What is an API Ecosystem?



0コメント

  • 1000 / 1000