CURL Command for Provisioning fails with unknown error.

fjkaplan
Community Member

I am attempting to Start a Report (Provisioning) as per the Canvas documentation.

 

When I run the following command from Windows to our Canvas instance:

curl -X POST https://birdville.test.instructure.com/api/v1/accounts/1/reports/provisioning_csv -H "Authorization: Bearer <hidden>" -H 'Content-Type: multipart/form-data' -F 'parameters[enrollments]=true' -F 'parameters[enrollment_term_id]=1'

I get this:

{"id":670,"progress":0,"parameters":{},"current_line":null,"status":"created","report":"provisioning_csv","created_at":"2021-08-27T09:49:35-05:00","started_at":null,"ended_at":null,"file_url":null}curl: (6) Could not resolve host: multipart

Then, I removed the -H 'Content-type':

curl -X POST https://birdville.test.instructure.com/api/v1/accounts/1/reports/provisioning_csv -H "Authorization: Bearer <hidden>" -F 'parameters[enrollments]=true' -F 'parameters[enrollment_term_id]=1'

And I get this:

{"id":671,"progress":0,"parameters":{},"current_line":null,"status":"created","report":"provisioning_csv","created_at":"2021-08-27T09:49:50-05:00","started_at":null,"ended_at":null,"file_url":null}

 

Can someone please help me to understand why these errors are occurring?

0 Likes