Add ContentNodeMetadata
model and API viewset
#3930
Labels
Milestone
ContentNodeMetadata
model and API viewset
#3930
Parent: #3808
Depends: #3927, #3929
Desired behavior
Add a new model
ContentNodeMetadata
to thekolibri_public
appContentNode
from the existingkolibri_content
appContentNode
from kolibri/contentlang
field should be overridden and made a FK to the coreLanguage
modellicense
field should be overridden and made a FK to the coreLicense
modelAdd a new
ContentNodeMetadataViewset
similar to Kolibri's which returns a JSON responseGET
method requests/kolibri/api/public/v2/contentnode/
should require at least one filter and return matching content nodes/kolibri/api/public/v2/contentnode/<contentnode_id>
should return info for the requested contentnodemax_results
param defaulting to 25 (set an absolute maximum of 100)available
fields asTrue
https://studio.learningequality.org/content/
orhttps://hotfixes.studio.learningequality.org/content/
etc. depending on the environment)Cache-control
response header with valuepublic, stale-while-revalidate=100, max-age=300
Last-modified
response header which is equal to the greatestlast_updated
of the channel(s) in the responseIf-modified-since
request header and should minimally filter the request and return a304 Not modified
response if no associated channels in the response have alast_updated
that is greater (see conditional processing)Set-cookie
headers in the responseExample response:
contentnode
metadataExample response:
contentnode.lang
Example response:
contentnode.files[]
Example response:
contentnode.assessmentmetadata
Current behavior
These do not exist currently on Studio
Value add
This model and API will support remote content browsing on Studio
The text was updated successfully, but these errors were encountered: