Users In Course - Teachers

25 views
Skip to first unread message

Rob Callicotte

unread,
Feb 27, 2015, 1:55:50 PM2/27/15
to canvas-l...@googlegroups.com
https://canvas.beta.instructure.com/doc/api/all_resources.html#method.courses.users

GET /api/v1/courses/:course_id/users


The user Request Parameters, such as enrollment_type in this one - how are these added to the query in the string? Is it like the following?

api/v1/courses/:course_id/users?enrollment_type:"TeacherEnrollment"

Simon Williams

unread,
Feb 27, 2015, 4:27:01 PM2/27/15
to canvas-l...@googlegroups.com
api/v1/courses/:course_id/users?enrollment_type=teachers&other_param=true

See http://en.wikipedia.org/wiki/Query_string or search for html query string syntax for more information.


--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob Callicotte

unread,
Mar 2, 2015, 2:50:46 PM3/2/15
to canvas-l...@googlegroups.com
Thanks Simon!

Rob Callicotte

unread,
Mar 2, 2015, 2:58:02 PM3/2/15
to canvas-l...@googlegroups.com
Come to think of it, I'm not sure what you're saying differently than what I am saying. This still just doesn't work. 

Here's the URL if you want to check it out - https://<canvas>/api/v1/courses/:course_id/users?enrollment_type=teachers&other_param=true&access_token=<token>


On Friday, February 27, 2015 at 3:27:01 PM UTC-6, Simon Williams wrote:

Simon Williams

unread,
Mar 2, 2015, 3:27:15 PM3/2/15
to canvas-l...@googlegroups.com
Hey Rob,

In the original question you were using colon’s instead of equal signs in your query params, so I figured that was your problem.  The query looks right now, other than you need to specify a specific course id number in place of “:course_id” in the url (and you don’t need other_param, I was just using that as an example of how you combine two different query params together).

If it still fails with a real course id number in the url, check your logs and look for an error message and a stack trace, that might be helpful in debugging further.

Simon

Rob Callicotte

unread,
Mar 4, 2015, 9:37:47 AM3/4/15
to canvas-l...@googlegroups.com
This woks:

api/v1/courses/<canvas course id>/users?enrollment_type=teacher&access_token=<token>
Reply all
Reply to author
Forward
0 new messages