Skip to content

Add REST API to List and Retrieve Managers #384

@stranske

Description

@stranske

Why

Currently the API only supports creating managers via POST. We need a way to list all managers and retrieve individual manager records.

Scope

Add read endpoints for manager data - both collection listing and individual retrieval.

Non-Goals

Not provided.

Tasks

  • Add endpoint to get all managers
  • Add endpoint to get manager by ID
  • Support pagination for list endpoint
  • Add response models for manager endpoints in models.py with fields for ID, name, and role.

Acceptance Criteria

  • GET /managers returns paginated list
  • GET /managers/{id} returns single manager or 404
  • Pagination supports limit and offset
  • Tests added for new endpoints

Implementation Notes

Use FastAPI Query parameters for pagination. Return 404 if manager ID not found.


<details>
<summary>Original Issue</summary>

````text
```markdown
## Why

Currently the API only supports creating managers via POST. We need a way to list all managers and retrieve individual manager records.

## Scope

Add read endpoints for manager data - both collection listing and individual retrieval.

## Non-Goals

_Not provided._

## Tasks

- [ ] Add endpoint to get all managers
- [ ] Add endpoint to get manager by ID
- [ ] Support pagination for list endpoint
- [ ] Add response models for manager endpoints in `models.py` with fields for ID, name, and role.

## Acceptance Criteria

- [ ] GET /managers returns paginated list
- [ ] GET /managers/{id} returns single manager or 404
- [ ] Pagination supports limit and offset
- [ ] Tests added for new endpoints

## Implementation Notes

Use FastAPI Query parameters for pagination. Return 404 if manager ID not found.
</details>

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions