RESTful APIs for managing and storing call and contact information using Python FastAPI.
GET /api/contacts/
: Get all existing contactsPOST /api/contacts/{contactId}
: Create a new contactDELETE /api/contacts/{contactId}
: Delete an existing contactPATCH /api/contacts/{contactId}
: Update an existing contact
GET /api/calls
: Get all call registryPOST /api/calls
: Create a new call entryGET /api/calls/{callId}
: Get a call by IdDELETE /api/calls/{callId}
: Delete a call entryPATCH /api/calls/{callId}
: Update an existing call entry
GET /api/find-contact-by-number/{number}
: Get a contact from a number. This endpoint is used to look for the contact when there is an incoming call.
To install and run the CID Management System REST API, follow these steps:
- Clone this repository:
git clone https://github.com/danielecostarella/pycalls-api.git
- Navigate to the project directory:
cd pycalls-api
- Install the required packages:
pip install -r requirements.txt
- Run the API:
uvicorn app.main:app --host localhost --port 8000 --reload
Once the API is running, you can use any HTTP client to make requests to the API endpoints. For example, you can use curl
to make a GET
request to the api/contacts
endpoint:
curl http://localhost:8000/api/contacts
This will return a JSON response containing all the contacts in the directory.
If you'd like to contribute to this project, please follow these steps:
- Fork this repository.
- Create a new branch for your feature:
git checkout -b feature/your-feature
- Implement your feature and test it.