Postman Canvas API collection

dsweeney2
Community Participant
11
6667

I posted this in a previous thread that is now rather buried in the new structure, so I'm reposting for those who might be interested.

I've written a python script to collect all the API docs from the Swagger documentation and create a collection that you can import into Postman. At latest count there are 800 requests across the whole collection. Available here:

Damian Sweeney / Canvas API Postman · GitLab

Tags (2)
11 Comments
bbennett2
Community Champion

I would kudo this more and more if I could. This is an incredible help...thanks so much!

samuel_malcolm
Community Participant

this is a huge time saver, thank you!

DanGioia
Community Member

This is great, Thanks!

carols
Community Explorer

This is excellent, thanks so much for taking the time to develop and share it

sor1
Community Participant

This is fantastic.

Notes:

1) Just run the python script as is - no need to change anything

2) The Postman Import file command creates a Canvas API folder automatically. 

ReinelRios
Community Member

@dsweeney2 @sor1 

I'm trying to use the script but it is not working for me.

I got this error:

C:\Users\Name\Downloads\canvas-api-postman-master>py canvas-api-postman.py
Traceback (most recent call last):
File "C:\Users\Name\Downloads\canvas-api-postman-master\canvas-api-postman.py", line 2, in <module>
import requests
ModuleNotFoundError: No module named 'requests'

dsweeney2
Community Participant
Author

@ReinelRios You'll need to install the requests python module.

pip install requests

should do it. More info here:

https://pypi.org/project/requests/

ReinelRios
Community Member

@dsweeney2 thanks!!! This was what was missing, now the script works perfectly. 

BenGirard
Community Member

My apologies for this stupid question, but how could we directly download this PostMan collection and import it.  Why do we need to run a python script? I'm not a programmer and not familiar yet with Canvas by I know how to use PostMan really well.  If possible, can someone share a link to download or share the actual collection, I would be very grateful. 

dsweeney2
Community Participant
Author

Hi Ben,

The reason is that the API changes. The script gets the latest version of the API schema and generates a Postman collection from that. I've created a new one and added it to the repository.

https://gitlab.unimelb.edu.au/dsweeney/canvas-api-postman/-/blob/master/collection-2024-08-12.json?r... 

BenoitGirard
Community Member

Thank you kind Sir!! I'm not setup to run Python, downloading the entire postman collection is one go greatly simplifies everything.