API Model for Google Maps Service
Understand API endpoints and data entities for the Google Maps API.
The previous lesson discussed the architectural style, communication protocol, and data formats. Let's define and discuss the input and output of our Google Maps API in this lesson. We’ll cover some important aspects of designing our API, such as defining the base URL and other endpoints, deciding data entities, and defining the request-response format for each API call.
Let's start with the base URL of our Google Maps API.
Base URL and API endpoints
The base URL for our Google Maps API comprises protocol (https
), domain (api.googlemaps.com
), and version(v1.0
). The path for our Google maps services, such as maps, route finder, navigation, places, and so on, is represented in the URL with services
. The image below shows the base URL for our API:
The following illustration depicts each API's endpoints, operations, and HTTP versions for our Google Maps API:
The &
will be used in the aforementioned URL to separate the parameters. The parameter details for each endpoint are given below:
/maps
: The map endpoint allows users ...