What is an API?

Sabrina Hockett
Another Integration Blog

--

The question everyone seems to know the answer to, but can’t actually explain, especially if lacking a traditional technical background. Using myself as an example, I came to the integration space from a marketing role for electric bikes. Talk about an industry change! My technical background extends no further than being able to do a bit of HTML coding for websites and mastering the creation of ‘Zaps.” Thus, when I was first asked during my interview a couple years ago, “Can you explain what an API is” the only answer I could give was “it’s like a bridge” or “think of it as a building block.” Insert side eye emoji here.

Of course that is not the answer to “What is an API?” but when I embarked on my mission to find the perfect answer that I would memorize and use every time someone asked, it was a lot harder to find than I thought. Each company has their own variation of the definition, but according to the Oxford Dictionary, an API is:

Application Programming Interface: A set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service.

So, a bunch of jargon if you ask me. I reached out to Alexandra Martinez, Developer Advocate at MuleSoft for an API 101 session to break down this definition. Alex authors a very popular blog ProstDev that dives into beginner to advanced API integrations. Based on her article “Understanding APIs: What is an APIhere is what I learned and how I plan to answer the question of What is an API? in the future.

Learnings from Alex:

An API is actually made of four components and the “Implementation.” Alex defines the Implementation as the body of the API.

  • Inputs: pieces of data that you can send to the implementation
  • Operations: define what you want the API to do with the inputs
  • Outputs: pieces of data that you receive from the implementation based on the operations defined above.
  • Data Types: will the data you send and receive be in numbers, words, Excel files, JSON, XML etc.

There are also two key functions of an API:

  • Request: The combination of the Inputs and Operations aka everything you send to the API (Implementation).
  • Response: The Outputs from the API as well as their Data Types aka everything sent back from the API to you.

With Alex’s permission, I wanted to include this diagram she created that puts all of the definitions above into a visual that I personally find super helpful.

Remember here that Implementation = the body of the API

So, what is an API?

While I will likely still include an analogy or two to help others visualize what an API does and how it works, I now can also add more technically accurate vocabulary to my definition. Moving forward, here is how I plan to answer the question:

“An API is often compared to a building block or bridge that enables companies to create seamless customer experiences. What an API actually is, is a mechanism that makes a request using data inputs and operations you define, and then gets a response and sends data back to you. All in all, an API connects systems and data and enables users to have more seamless applications. “

I’m curious how you define an API. Let us know in the comments!

--

--

Sabrina Hockett
Another Integration Blog

Community Marketing at MuleSoft with a focus on bringing our customer/partner stories to life!