A basic URL shortening service developed as a REST API using Python and Flask. This API allows users to shorten long URLs into shorter versions, making them easier to share and manage.
GET /health: Returns the service health data of the application along with the service health of its connected services. Example response:
{
"response-timestamp": "2024/03/25T00:33:28:570514",
"response-data": {
"health-check-timestamp": "2024/03/25T00:33:28:570464",
"application-name": "URL-SHORTENER-REST-API",
"application-status": "UP",
"connected-services-health": []
}
}
POST /shorten: (To be implemented) Shorten a long URL into a shorter version. Example request:
{
"long_url": "https://example.com/very/long/url"
}
Example response:
{
"response-timestamp": "2024/03/25T00:33:28:570514",
"response-data": {
"short_url": "http://localhost:5000/abcd1234"
}
}
GET /\
GET /original: (To be implemented) Retrieve the original URL from the given short URL value. Example request:
GET /original?short_url=abcd1234
Example response:
{
"response-timestamp": "2024/03/25T00:33:28:570514",
"response-data": {
"original_url": "https://example.com/very/long/url"
}
}
pip install -r requirements.txt
.flask run --debug
flask run
This project is licensed under the MIT License - see the LICENSE file for details.