Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add an API route for GET /complaints #427

Open
DMalone87 opened this issue Mar 6, 2025 · 0 comments
Open

[FEATURE] Add an API route for GET /complaints #427

DMalone87 opened this issue Mar 6, 2025 · 0 comments

Comments

@DMalone87
Copy link
Collaborator

As a user of the API, I would like to be able to request a subset of the complaints that exist in the database. To accommodate this, we should add an API route that can handle this request. The API route should accept the following filters:

  • Source UID
  • Source Type
  • Officers Involved
  • Category
  • Reason for Conflict
  • Outcome of Conflict
  • Date GTE
  • Date LTE

Example:

curl --request GET \
     --url 'http://127.0.0.1:5001/api/v1/complaints?source_type=government' \
     --header 'accept: application/json'

Additional context
Incident Routes - This will need to be converted to complaints.py
Complaint Model
GET Complaints API Docs

The API docs can be used as a guide for the expected behavior of the API.

@DMalone87 DMalone87 changed the title [FEATURE] Add Filters to the Complaints routes [FEATURE] Add an API route for GET /complaints Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant