openedx / openedx/openedx-platform

Unify Certificate Generation and Regeneration APIs into a Single Endpoint

Open
#36,961 10 comments 0 reactions 1 assignee View on GitHub

@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:

https://github.com/openedx/edx-platform/blob/8fac3bc060ca7c79dce33117903b715841d4385f/lms/djangoapps/instructor/views/api_urls.py#L84

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.