openedx / openedx/openedx-platform
Unify Certificate Generation and Regeneration APIs into a Single Endpoint
@wgu-ram-chandra is already working on this.
Since Jul 1, 2025.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
These apis can be converted into one single api.
Currently, we have three separate API endpoints for initiating certificate-related tasks:
enable_certificate_generation - enables or disables self-generated certificates for students.
start_certificate_generation – starts generation for all enrolled students.
start_certificate_regeneration – regenerates certificates based on provided certificate_statuses.
All endpoints perform similar operations (triggering background tasks for a course), but differ slightly in required input and logic. To simplify API usage, reduce duplication, and improve maintainability, we propose merging both endpoints into a single unified API.
Proposed Changes:
Introduce a unified API endpoint:
/certificate_task/<course_id>
Use a mode parameter in POST data to determine the action:
generate
regenerate
toggle
You'll also need to update the frontend code to replace all usages of the old endpoints with the new unified API.
Contributor guide
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.
Assessment
This issue has not been assessed yet.