Moodle Step 4 - Creating A Web Service

  • Last updated on October 6, 2021 at 10:41 AM

This will take you through creating a web service in Moodle.

  • As before navigate to 'Site administration' , then find 'Plugins' > 'Web services' > 'Select a service'.
  • Underneath the customer services section click Add.
  • Create an external service with a name and short name. The short name will be used as your web services name in step 2 of myday Moodle API connector setup guide, it should be comprised of only alphanumeric characters and should not contain any spaces or special characters.
  • Select enabled and allow authorised users only.
  • Select 'Add service'.

 

     Adding Functions:

  •  In the screen that follows from adding the service you will prompted to add functions to the service, these essentially act as the endpoints that myday will make use of. Further information can be found regarding these functions in the Moodle web services documentation found here: https://docs.moodle.org/35/en/Using_web_services
  • Click add functions and then proceed to add the following functions, which are also typed below:
  • core_enrol_get_users_courses
  • core_calendar_get_calendar_events
  • mod_assign_get_assignments
  • mod_assign_get_participant
  • mod_quiz_get_quizzes_by_courses
  • mod_workshop_get_workshops_by_courses
  • mod_workshop_get_submissions
  • mod_choice_get_choices_by_courses
  • mod_lesson_get_lessons_by_courses
  • mod_lesson_get_attempts_overview
  • mod_data_get_databases_by_courses
  • mod_data_get_entries
  • mod_quiz_get_user_attempts
  • core_user_get_users_by_field

Click here to move to step 5

Was this article helpful?