Canvas Enrollment Parameters Request issue

ehavermale
Community Novice

Hello,

I am attempting to make a request to get all completed courses for a given user. I am using PHP and cURL to make my Oauth request for tokens and call. When I run a request against https://<mycanvasintallpath>/api/v1/users/:user_id/enrollments I get the expected list of all active and invited course for that users. When I add the string ?type=StudentEnrollment this also works as expected showing all enrollments where that user is a student. My issue comes when I tried to using any other enrollment parameter : state, role, etc... When I use

https://<mycanvasintallpath>/api/v1/users/:user_id/enrollments?state=active for example i get an error message internal_server_error. I know normally this error occurs when there is a PHP error preventing the program from running but I have no access to the php logs since this is a hosted system.

I have tried making a request against the courses and didn't have any issues using parameters:

https://felbry.instructure.com/api/v1/courses?state=completed works as expected.

Has anyone else experienced an issue with enrollments before?

Thank you.