Skip to content

add extra data to certificate endpoint #2875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2025
Merged

Conversation

gumaerc
Copy link
Contributor

@gumaerc gumaerc commented Aug 12, 2025

What are the relevant tickets?

Related to https://github.com/mitodl/hq/issues/8009

Description (What does it do?)

This PR replaces the integer ID's on the course_certificates and program_certificates endpoints for course_run and program respectively with the serialized representation of the object they represent. For course_run, CourseRunWithCourseSerializer was used and for program I used ProgramSerializer.

How can this be tested?

  • Spin up MITx Online on this branch
  • Make sure you have sufficient data to test certificates:
    • Some test courses (Django admin)
    • Some test programs (Django admin)
    • A B2B organization with associated programs (Using B2B management commands, see docs for more detail)
    • Your user should be enrolled in at least one of these courses and have a grade (Enrollments done in the dashboard UI, grades in Django admin)
    • Course run and program certificates created for your user (Django admin and Wagtail)
  • Once you have created the course run and program certificates, use their UUID (from Django admin) to hit the certificates URL and ensure that the serialized course run / program are included in the response:
    • /api/v2/course_certificates/uuid-goes-here
    • /api/v2/program_certificates/uuid-goes-here

@gumaerc gumaerc force-pushed the cg/certificate-api-extra-data branch from 3fdb5c6 to 8d03925 Compare August 13, 2025 14:59
Copy link

@jonkafton jonkafton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Efficient to have all the data needed to render the certificates on a single endpoint. I've integrated into mitodl/mit-learn#2429 and works great 👍

@gumaerc gumaerc merged commit d0b3b73 into main Aug 14, 2025
9 of 10 checks passed
@odlbot odlbot mentioned this pull request Aug 18, 2025
4 tasks
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.

2 participants