API PUSH and PUT misinterpreted as GET

32 views
Skip to first unread message

unde...@gmail.com

unread,
Jun 24, 2016, 5:29:35 PM6/24/16
to Canvas LMS API Users
We're having a problem integrating our SIS tool with Canvas via PHP. Whenever our code sends a PUSH or PUT command via CURL through PHP to update an account, the command gets interpreted as a GET, and nothing changes.

Our instance of Canvas is hosted with Instructure, but the server which hosts our PHP scripts are on a domain without an SSL certificate. Could this have something to do with our issue? I've looked through the API documentation, but can't find anything that references this.

If anyone has any ideas, they would be greatly appreciated.

Thanks in advance.

Richard

Cody Cutrer

unread,
Jun 28, 2016, 2:41:52 AM6/28/16
to canvas-lms...@googlegroups.com
Richard,

Do you mean POST, and not PUSH?

As for SSL, no, that should not matter since Canvas is not opening a connection back to your server.

Cody Cutrer
Software Engineer
Instructure

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

Richard S. Crawford

unread,
Jun 28, 2016, 9:41:59 AM6/28/16
to canvas-lms...@googlegroups.com
Hi Cody,

Thanks for writing. Yes, I did mean POST and not PUSH. It's been a long week.

Do you have any idea why this might be happening?

Richard


--
You received this message because you are subscribed to a topic in the Google Groups "Canvas LMS API Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/canvas-lms-api-users/r1t0L8qX2VY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to canvas-lms-api-u...@googlegroups.com.

Battis, Seth

unread,
Jun 30, 2016, 11:43:31 AM6/30/16
to canvas-lms...@googlegroups.com
You might check your CURL headers?

I do lots with PHP and the Canvas API, but allow educoder/pest to abstract away most of the guts of CURL. Here's what it does to effect a PUT.

(Minor plug: I build my open PHP object, CanvasPest that wraps around a fork of Pest, so I rarely, if ever, think about the actual CURL commands or pagination or what-have-you.)


— S

Mathematics Dept. Chair • Director of Academic Technology • FIRST Team Mentor
St. Mark's School • 25 Marlboro Rd., Southborough, MA 01772 • stmarksschool.org
Reply all
Reply to author
Forward
0 new messages