Skip to content

Conversation

kevineumutoni
Copy link
Collaborator

@kevineumutoni kevineumutoni commented Sep 8, 2025

Description

This PR implements a basic REST API for the Agent model.

What is this?
A Django REST Framework API that allows CRUD operations (create, read, update, delete) for agents via JSON endpoints.

Why this?
To provide a backend service for managing agent information, which can be consumed by a frontend.

How are you doing this?

  • Defined the 'Agent' model.
  • Created a serializer to convert model instances to/from JSON.
  • Built API views using DRF generics for listing, creating, retrieving, updating, and deleting agents.
  • Registered URLs for API endpoints.
  • Configured project settings for JSON-only REST API responses.
  • Added basic model unit tests.

Fixes # (issue)
Click Up link
Figma link

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Optimization
  • Improvement

How Has This Been Tested?

  • Manual testing of all API endpoints using Postman and browser requests.
  • Unit tests for the Agent model (agents/tests.py).

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Ndichu-shee Ndichu-shee merged commit cede13d into develop Sep 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants