opensafely-core / opensafely-core/opencodelists
API endpoint for fetching a single codelist
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
Add an API endpoint to fetch a single codelist directly by slug.
There is no current client for this in the OpenSAFELY systems, but it seems plausibly useful to those interested in using the OpenSAFELY API in scripting and tooling. Part of the "Open" ethos is that the resources that are publicly human-accessible on the site should be conveniently accessible in machine-readable form via an API.
It would be useful in https://github.com/ebmdatalab/codeusage/, allowing it to avoid needing to decode the organization from the slug and fetch all codelists in the organization then find the specific codelist within the response. This is slowing down this tooling and slightly inefficient for our resource consumption.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing API routes and response handling for codelists, then inspect how codelist slugs and organization lookups are represented. Define the single-codelist endpoint and confirm its response matches the machine-readable API conventions. Done means a codelist can be fetched directly by slug without fetching all codelists in an organization, with coverage for the endpoint behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100