The Planetary API is a Flask-based RESTful API for managing planetary data and user information. It provides endpoints for CRUD operations on planets and supports user authentication and password retrieval using JWT and email services. The application uses SQLite as the database and includes sample data for testing purposes.
User ManagementRegister usersUser login with JWT token generationPassword retrieval via emailPlanetary Data ManagementAdd, update, delete, and view planetary informationAuthenticationSecured endpoints using JWTEmail NotificationsSend password recovery emailsDatabase CommandsCreate, drop, and seed the database using CLI commands
Endpoint | Method | Description |
---|
/register | POST | Register a new user. |
/login | POST | User login, returns a JWT. |
/retrieve_password/<email> | GET | Sends the user's password via email. |
Endpoint | Method | Description |
---|
/planets | GET | Retrieves a list of all planets. |
/planet_details/<planet_id> | GET | Retrieves details of a specific planet. |
/add_planet | POST | Adds a new planet (requires JWT). |
/update_planet | PUT | Updates an existing planet (requires JWT). |
/remove_planet/<planet_id> | DELETE | Deletes a planet (requires JWT). |