Friday, 17 May 2019

The Non-Programmer's Guide to Using APIS

Even if you don't know what an API is, you've undoubtedly interacted with one.

Today, we take connectivity between technology largely for granted. For instance, we don't question when we use OpenTable to make a reservation at a nearby restaurant.

Alternatively, if you use Kayak.com to book flights, you've probably never wondered, Wait a minute … how does Kayak know JetBlue has an open seat in 27A?

Ultimately, any time you need applications to communicate with one another, you need an API, or application programming interface.

Here, we're going to explore what an API is, and why you'd need to use one. Even if you're not a programmer and don't need to know extensive technical jargon, you should still understand the basics, since nowadays, integrations between technology are often critical components of anyone's job.

Improve your website with effective technical SEO. Start by conducting this audit. 

What is an API?

At its most basic definition, an API lets one piece of software talk to another piece of software.

To understand an API in action, let's consider a real-life example -- HubSpot's integration with Typeform. Typeform, a tool that supplies mobile-ready quizzes, contact forms, and signup forms, needs to integrate with HubSpot's Forms API to to interact with the forms tool and seamlessly send submissions from Typeform forms into the HubSpot CRM.

To do this, Typeform's API and HubSpot's API need to talk. An integration can act as a translator, ensuring each API's information is correctly translated for the other application -- in this case, the integration may ensure that Typeform form fields are correctly mapped to the corresponding HubSpot fields.

Isaac Takushi, a HubSpot Developer Support Specialist, explains -- "You can think of APIs and the 'endpoints' they comprise as access points for different information. Each API endpoint may only have one specific job. When combined, however, different endpoints can support powerful, multifaceted integrations."

Kayak.com, for instance, needs some API to communicate with JetBlue's systems. When you search "Boston to Charlotte" in Kayak, JetBlue's booking API will essentially receive this request from Kayak, pull up information related to that request, and send it back. However, Kayak will need its own API or code to understand and act on the information the JetBlue API returned.

To use an API, you'll want to check out the API’s documentation for access requirements. For instance, HubSpot's Contacts API requires authentication:

Similarly, you'll need an API key to access Google's API, Facebook's API, and Twitter's API.

Once you have access requirements, you can use a tool like Postman or Runscope to manually interact with an API. These third-party tools, or "REST clients," allow you to make one-off requests to API endpoints without coding. They're great for getting a feel for what your backend systems may do automatically. Check out this resource on how to make your very first API request with Postman.

If you're not quite ready to jump in on the deep end with a REST client, try punching the following into your browser:

http://bit.ly/2EgJRkC

This is a public API endpoint from the free REST Countries service. Specifically, we're using the "Name" endpoint, which accepts country names as search queries. A successful search will return potential country matches, along with key information about each nation. In this case, we're searching for countries with names that contain the word “united.”

You should see following block of JSON data returned:

Congratulations! You just made an API request from your browser!

The endpoint returned raw data (formatted in JSON) on countries with "united" in the name.

It may not look pretty, but remember that APIs are designed for applications, which don't require the styling humans expect on an HTML web page. While you can easily Google "countries that begin with 'united'," applications cannot. They might have to rely on services like REST Countries to look up that information.

If you're unsure whether you should use your in-house developers to create APIs or look externally, check out First vs. Third-Party APIs: What You Need to Know.

Improve your website with effective technical SEO. Start by conducting this audit.  



from Marketing http://bit.ly/2WPnDxw
via

No comments:

Post a Comment