Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
747a0494
Commit
747a0494
authored
4 years ago
by
stvn
Browse files
Options
Downloads
Patches
Plain Diff
docs: Add ADR for DiscussionsConfiguration HTTP API [BD-03]
parent
9bfa56e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/discussions/docs/decisions/0003-configuration-rest-api.rst
+95
-0
95 additions, 0 deletions
...iscussions/docs/decisions/0003-configuration-rest-api.rst
with
95 additions
and
0 deletions
openedx/core/djangoapps/discussions/docs/decisions/0003-configuration-rest-api.rst
0 → 100644
+
95
−
0
View file @
747a0494
Expose Discussion Configuration via HTTP API
============================================
Status
------
Proposal
Context
-------
As part of the BD-03 initiative (Blended Development, Project 3),
we have previously created a discussion provider configuration backend,
`DiscussionsConfiguration`, as well as a new microfrontend (MFE),
`frontend-app-course-authoring`.
However, these two systems cannot yet interact with one another.
This document proposes the creation of a new HTTP API to connect the two.
Requirements
------------
For a given `context_key`, this API must allow:
- retrieval of:
- the list of available providers
- any options for the active provider
- creation of:
- new configurations
- updating of:
- existing configurations
- deletion/disabling of:
- unneeded/inactive configurations
Consideration
-------------
The API should follow existing best-practices and technology as exists
in `edx-platform`. We should _not_ introduce new API architecture.
Decision
--------
We propose to implement this as a Django REST Framework (DRF)-based HTTP API.
This API will provide the following HTTP methods:
- GET
- Retrieve collection of active and available providers,
as well as their options
- POST
- Create, update, or disable a configuration
Payload Shape
-------------
The payload is expected to be shaped like this (key names subject to change):
.. code-block:: python
payload = {
'context_key': str(configuration.context_key),
'enabled': configuration.enabled,
'features': {
'discussion-page',
'embedded-course-sections',
'lti',
'wcag-2.1',
},
'plugin_configuration': configuration.plugin_configuration,
'providers': {
'active': configuration.provider_type or '',
'available': {
provider: {
'features': PROVIDER_FEATURE_MAP.get(provider) or [],
}
for provider in configuration.available_providers
},
},
}
The following configuration values are explicitly omitted;
this should be left entirely up to the MFE.
- name
- logo
- description
- support_level
- documentation URL
The LTI configuration (keys, secrets, URLs, etc.) are considered
out-of-scope at this time.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment