What is a REST API?
More generally, an API (application programming interface) refers to a set of constraints that allow for communication between applications.
At its core, a REST API is used to retrieve, modify, and/or delete data between applications, and it conforms to a specific (REST) architecture and set of constraints. Typical response formats include JSON, XML, CSV.
Why would you use a REST API?
A REST API is a convenient method of sharing data between entities because of its flexibility, scalability, as well as the fact that it is not tied to a specific resource. There is also the option of adding additional security via various authentication methods such as requiring an API key, Oauth 2.0, etc.
Some limitations include rate limits, defined by the application that holds your data. This refers to the maximum number of times an API call can be made in a certain time interval (e.g 1000 calls per hour). This prevents the application that stores your data from being overloaded with API calls.
REST API Request Type Cheat Sheet
There are a number of different request types that a REST API supports. Here is a brief cheat sheet describing each one.
GET: Retrieves resource contents
POST: Creates new resources, returns URL for later reference
PUT: Updates and replaces resource information
PATCH: Updates and modifies resource information
DELETE: Deletes a resource
Sample REST API Use Case
If you use applications such as Qualtrics (survey data), Mailchimp (email marketing), JIRA (ticketing software), Facebook Ads (ad service), you likely have a combination of user data, user activity data, overall metrics, and more.
The applications listed above all have REST API capabilities, which means you can retrieve, alter, and in some cases delete, data from an entirely different application with simple commands. (Caveat: what you can retrieve, alter, or delete depends on the endpoints defined by the application that holds your data.)
By retrieving data, you can perform customized analytics and aggregations to better understand KPIs and your response data in a separate application.
An example of a data analytics tool that supports REST APIs natively is Knowi, a unified analytics platform. You can join your REST API data with data from other applications, SQL or NoSQL databases, flat files, and more. You can then use the dashboard and widget features to build custom visualizations that simplify your data and make them presentable.
What has your experience been with using REST APIs? What tools do you use to aggregate and present your data?