This documentation details the usage of the Simple CRUD API for managing person entities. The API facilitates basic CRUD (Create, Read, Update, Delete) operations on person resources.
- Endpoint:
/api/person(HTTP POST) - Request Format: JSON
- Endpoint:
/api/person/{id}(HTTP GET) - Request Format: JSON
- Endpoint:
/api/person/{id}(HTTP PUT) - Request Format: JSON
- Endpoint:
/api/person/{id}(HTTP DELETE) - Request Success: JSON { "message": "Person deleted successfully" }
- The "name" field is mandatory for creating and updating a person.
- Missing or empty "name" values will lead to errors.
- The API is assumed to be running locally at
http://localhost:5000. Adjust the base URL as per your deployment.
Follow these steps to set up and deploy the API:
- Clone the repository from GitHub.
- Create a virtual environment and activate it (recommended).
- Install required dependencies: pip install -r requirements.txt
- Run the Flask application: python app.py
-
- The API will be accessible at
http://localhost:5000.
- The API will be accessible at
Utilize tools like Postman or custom scripts to interact with the API endpoints as demonstrated above.