Moodle REST API - Postman collection

Moodle REST API - Postman collection

by Haris Mateen -
Number of replies: 6

Hi,

I would like to get postman collection for all of the moodle rest APIs -

https://docs.moodle.org/dev/Web_service_API_functions
https://moodle.org/plugins/webservice_restful

Average of ratings: -
In reply to Haris Mateen

Re: Moodle REST API - Postman collection

by Josh Manders -
Me too! If not, I'll likely start my own as part of my 2023 NYE resolution.
In reply to Haris Mateen

Re: Moodle REST API - Postman collection

by Ron Meske -
Hello All,

For Postman, use POST with the following settings:
  1. Params: blank
  2. Authentication: No Auth
  3. Body: form-data

Note: I have been using the JSON protocol, and the only body type that seems to work is form-data.

In the body, setup the following keys:

  1. wstoken
  2. wsfunction
  3. moodlewsrestformat 

Then depending on the function being called you will need to add your data.  Check the data required and the format  in the webservice documentation.  your_domain/admin/webservice/documentation.php

Hope this helps.

Regards,

Ron

Average of ratings: Useful (1)