Closed phaldan closed 8 years ago
Call rest api after login to retrieve course list of moodle-user:
Route:
GET: /import/<moodle-token>
Reponse:
{ "courses": [ { "id": 1337, "shortname": "SE-AIN", "fullname": "Software Engineering" }, { "id": 42, "shortname": "MDSD", "fullname": "Modellgetriebene Softwareentwicklung" }, { "id": 1234, "shortname": "CLOUD", "fullname": "Cloud Application Development (Master)" } ] }
User selects courses for import and calls rest-api to finally imports courses
POST: /import/courses/<moodle-token>
Body
{ "courses": [ { "id": 42, "shortname": "MDSD", "fullname": "Modellgetriebene Softwareentwicklung" }, { "id": 1234, "shortname": "CLOUD", "fullname": "Cloud Application Development (Master)" } ] }
The response will be: (when successful)
{ "ok": true }
Note: The request will take a long time. But no need to wait on it
Request course list
Call rest api after login to retrieve course list of moodle-user:
Route:
Reponse:
Submit course list
User selects courses for import and calls rest-api to finally imports courses
Route:
Body