Skip to content

[FC-0118] docs: add ADR for merging similar endpoints#38262

Open
Abdul-Muqadim-Arbisoft wants to merge 2 commits intoopenedx:docs/ADRs-axim_api_improvementsfrom
edly-io:docs/ADR-merge_similar_endpoints
Open

[FC-0118] docs: add ADR for merging similar endpoints#38262
Abdul-Muqadim-Arbisoft wants to merge 2 commits intoopenedx:docs/ADRs-axim_api_improvementsfrom
edly-io:docs/ADR-merge_similar_endpoints

Conversation

@Abdul-Muqadim-Arbisoft
Copy link
Copy Markdown
Contributor

@Abdul-Muqadim-Arbisoft Abdul-Muqadim-Arbisoft commented Mar 31, 2026

Currently, Open edX APIs expose multiple narrow action-scoped endpoints for the same resource domain, duplicating permission checks, validation logic, and business logic across sibling views. This ADR proposes consolidating these fragmented endpoints into single parameterised DRF views backed by a shared service layer, using an action or mode parameter to distinguish operations
Issue: #38166

- Propose consolidation of narrow action-scoped URLs into unified parameterised views
- Document certificate generation endpoints as primary consolidation candidate
- Define action/mode parameter pattern and shared service layer approach
@Abdul-Muqadim-Arbisoft Abdul-Muqadim-Arbisoft changed the title docs: add ADR for merging similar endpoints [FC-0118] docs: add ADR for merging similar endpoints Mar 31, 2026
Copy link
Copy Markdown
Member

@deborahgu deborahgu left a comment

Choose a reason for hiding this comment

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

this makes some of the PR's I saw go through last year make so much more sense. 😀

Comment thread docs/decisions/0031-merge-similar-endpoints.rst Outdated
Comment thread docs/decisions/0031-merge-similar-endpoints.rst
Comment on lines +132 to +133
* Existing clients calling the legacy URLs require a migration period; deprecated aliases must be
maintained until adoption drops sufficiently.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

at least in openedx code, I'm pretty sure that these are only called internally by the instructor djangoapp, right? Although come to think of it that's probably just because this work got done last year. 😆

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right, within openedx the only caller is the instructor dashboard frontend, so the in-tree migration is atomic (backend + frontend together). The migration-period language was aimed at out-of-tree callers, Tutor plugins, custom MFEs, operator integrations etc

@deborahgu
Copy link
Copy Markdown
Member

approved but I added a suggested change.

Comment thread docs/decisions/0031-merge-similar-endpoints.rst Outdated
- Reword "pure REST" alternative per @deborahgu's suggestion: the
  proposed design is already RESTful (certificate_task is the noun,
  POST creates the task, payload specifies the task type)
- Clarify authorization model: preserve the three distinct permissions
  from the legacy endpoints via two-layer enforcement (coarse view-level
  check + per-mode service-level check). Updated implementation
  requirements, view docstring, and code skeleton to reflect this
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.

5 participants