A query string parameter is included after the ‘?’ in a URL and is used to filter or sort data, for example
http://our-site.com?color=red
. A path parameter, on the other hand, is part of the URL path itself and is used to identify a specific resource, likehttp://our-site.com/items/1
.
http://our-site.com
v3
stuff
things
Given this information, the API URL with a path id parameter would be
http://our-site.com/v3/stuff/things
.
The interface is like a restaurant menu. It lists all the options you can request from our API (the kitchen). When you choose something from the menu (make a request), our API prepares and serves up the data (the meal).
Middleware in this context acts like a security guard, checking credentials (basic auth with username and password or bearer auth with a token) before granting access to certain routes or data.
The OAuth handshake involves three steps. The user authenticates directly with an OAuth provider (like Google), the provider gives the user a special code, which the user then trades with our server for an access token.
Role Based Access Control is like having different keys for different doors in a building. Depending on your role (your key), you can access certain parts of the application (doors).