Design REST API
[!note]
TL;DR:Ā Best practice for RESTful API design is thatĀ path paramsĀ are used toĀ identify a specific resource or resources, whileĀ query parametersĀ are used toĀ sort/filter those resources.
GETĀ `/cars?color=blue`
Token base authentication
HMAC authentication (API key)
- Step 1 and 2 is user getting the API key
- Step 3 user generate a HMAC key based on the private key and the meta data
- Step 4 user send this key to the server.
- Step 5 Server which then extract the metadata and generate a HMAC key on the server side
- Step 6 and 7 server compare the HMAC key that was generated in the client vs in the server. If they're matched then the server send back the resource.