Is it possible to create a conference via an API?

Jump to solution
veronica_anders
Community Member

Hi.

Does anyone know if the conference API has the functionality to create, edit or delete?

From the documentation it looks like you can only GET data and not POST.

Thanks

Veronica

1 Solution
James
Community Champion

 @veronica_anders  

I created a conference inside Canvas to see what network call they were making.  The route used is /courses/:course_id/conferences, which does not have the /api/v1/ in front of it. Normally, that's a bad sign and it may not be available. Sometimes the route is exposed via the API but Canvas just uses an internal call.

I took the request that Canvas made to the non-API route and inserted the /api/v1 and sent it and it worked.

Yes, you can make an API call to create a conference. I didn't test editing and deleting, but I imagine they would work.

Those are undocumented calls, which means that they are technically unsupported, but like many things in Canvas, unlikely to change so it remains useful.

If you look at the source code for the conferences_controller.rb file, you can get an idea of what is expected. Do a browser search in the code for "def XXX" where XXX is the action, like index (list), show (get), create (new), update (edit), and maybe destroy (delete).

Personally, I don't find that so useful because the code that actually does stuff is somewhere else and I don't understand the code well enough to make it meaningful to me.

What I do is open up the browser's developer tools (F12 for chrome and firefox), switch to the network tab, and then have Canvas do the action I want it to do. That's how I got the route above. In the headings section, you can scroll down and it will show the request headers (mostly not-helpful) and the form data (this is what you want).

View solution in original post