mertsalik / short-url

Practice project
MIT License
0 stars 0 forks source link

System API Design #1

Open mertsalik opened 2 years ago

mertsalik commented 2 years ago
short-url Basic System Design 2022-04-10 at 15 40 33
mertsalik commented 2 years ago

V2 image

mertsalik commented 2 years ago

Shorten URL

Http POST api/v1/url/ Parameters

Response Codes Successful : 201 + Shortened Url in the Body Invalid Request: 400 + Json Body /w descriptive error message Internal Error: 500 + Json Body /w descriptive error message

An original URL can be stored multiple times.

Access URL

Http GET /u/URL-ALIAS Parameters

Responses Successful: 302 -> ( Temporary Relocation ) + Original URL on headers Invalid Request: 404 Not Found Internal Error: 500 + Json Body /w descriptive error message

mertsalik commented 2 years ago

Delete URL

Http DELETE api/v1/url/ Path Parameters

Response Codes Successful : 204 No Content Invalid Request: 404 - Not Found Internal Error: 500 + Json Body /w descriptive error message