API Design
The API service following REST architecture performs 2 operations (endpoints):
- POST a long url and get the short url by passing it to hash functions in order to reduce the size of it and store the mapping of long url to short url in db.
- Make a GET call in order to get long url on the basis of short url for redirection