Adds new public content metadata endpoints, allows for remote browsing of metadata#9474
Conversation
Build Artifacts
|
2202a72 to
3e40bb4
Compare
jredrejo
left a comment
There was a problem hiding this comment.
Code looks good to me. I've tested it and haven't found any issue.
However I'd love to know the purpose of this new proxy api. Obviously it's incompatible with previous versions of kolibri, so I'd like to be sure this is not thought to interact with old servers at any point.
The primary purpose is to allow remote browsing of other Kolibri's libraries, so that the resources can be directly interacted with and previewed, without having to import them first. In an ideal world, we would make this work for any previous version of Kolibri as well, but my sense is that the complexity we would have to introduce to ensure that would be high. If we do change our content schema in the future, we would have to provide some sort of translation layer (in the same way we do now for metadata import) to map from an older schema to a newer one. I am in two minds about whether we will want to do this, but that's the reason for using the versioned public APIs so we can have a clear signal when we need to do that mapping if needed. |
…h prefix. Fix behaviour.
Summary
baseurlquery parameter handling to these three internal endpointsReferences
Fixes #9381
Fixes #9380
Fixes #9390
Fixes #9385
Fixes #9382
Fixes #9391
Reviewer guidance
Test the three endpoints with another instance of Kolibri running (preferably from a different Kolibri home dir, so that different metadata will be returned).
Example URLs:
Channel:
http://127.0.0.1:8000/api/content/channel/?format=json&baseurl=http://127.0.0.1:8080/Public:
http://127.0.0.1:8000/api/public/v2/channel/?format=jsonContentNode:
http://127.0.0.1:8000/api/content/contentnode/?format=json&max_results=25&baseurl=http://127.0.0.1:8080/Public:
http://127.0.0.1:8000/api/public/v2/contentnode/?format=json&max_results=25Tree:
http://127.0.0.1:8000/api/content/contentnode_tree/<topic_id>/?format=json&max_results=2&baseurl=http://127.0.0.1:8080/Public:
http://127.0.0.1:8000/api/public/v2/contentnode_tree/<topic_id>/?format=json&max_results=2Testing checklist
PR process
Reviewer checklist
yarnandpip)