top of page

URL Composition of REST API

A RESTful API needs to have one and exactly one entry point. The URL of the entry point needs to be communicated to API clients so that they can find the API.

The endpoint URL consists of a base URL, a resource path, and query parameters. The base URL is the internet host name for the REST API.

Each URL is called a request while the data sent back to you is called a response.

The endpoint (or route) is the url you request for. It follows this structure:


The root-endpoint is the starting point of the API you’re requesting from. The root-endpoint of Github's API is while the root-endpoint Twitter's API is

The path determines the resource we are requesting for.

We can access paths just like we can link to parts of a website.

The endpoint to get a list of my repos on Github is this:

The final part of an endpoint is query parameters. Query parameters gives the option to modify request with key-value pairs. They always begin with a question mark (?). Each parameter pair is then separated with an ampersand (&) like this

173 views0 comments

Recent Posts

See All


Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page