- very basic django and drf setup,
- model for storing long urls with corresponding short url ids,
- two simple endpoints for setting short urls and getting long ones,
- url config,
- happy path tests.
The api's follows only the happy path with proper requests (remember - it's minimalistic). So there's no real handling of errors, bad requests etc.
POST
/api
with parameter url
curl --location 'http://127.0.0.1:8000/api' --data '{"url": "https://example.com"}' --header 'Content-Type: application/json'
GET
/api/{uuid}
curl --location --request GET 'http://127.0.0.1:8000/api/1d7ba61c-d8b3-467f-a278-27ee6ac7bdc2'