REST API Basics
Understanding REST APIs for use with API Mapper
REST API Basics
This guide covers the fundamentals of REST APIs to help you work effectively with API Mapper.
What is a REST API?
A REST (Representational State Transfer) API is a standardized way for applications to communicate over HTTP. When you use API Mapper, you're essentially telling it:
- Where to get data (the URL)
- How to authenticate (API key, token, etc.)
- What data to extract (field mapping)
Anatomy of an API Request
Base URL
The root address of the API:
Endpoint
The specific resource path:
Full URL
Base URL + Endpoint:
HTTP Methods
| Method | Purpose | Example |
|---|---|---|
| GET | Retrieve data | Get list of products |
| POST | Create data | Create a new order |
| PUT | Update data | Update user profile |
| DELETE | Remove data | Delete a comment |
API Mapper primarily uses GET requests to fetch data.
Understanding JSON Responses
APIs return data in JSON format:
To access the products in API Mapper:
- Path to list:
data.products - Product name:
name - Product price:
price
Common Response Patterns
Array at Root
Path: Leave empty or use []
Nested in Data Object
Path: data
Paginated Response
Path: items
Query Parameters
Many APIs accept parameters to filter or customize results:
In API Mapper, add these in the Query Parameters section:
category=electronicslimit=10sort=price
API Documentation
Before connecting an API, always check its documentation for:
- Base URL - Often listed as "API Base URL" or "Endpoint"
- Authentication - How to authenticate requests
- Endpoints - Available data resources
- Response format - Structure of returned data
- Rate limits - How many requests you can make
Finding Public APIs
Practice with these free, no-auth APIs:
| API | URL | Data |
|---|---|---|
| JSONPlaceholder | jsonplaceholder.typicode.com | Posts, users, comments |
| REST Countries | restcountries.com/v3.1 | Country data |
| Open Library | openlibrary.org | Book data |
| PokéAPI | pokeapi.co/api/v2 | Pokémon data |
Next Steps
Was this page helpful?