CanvasAPI icon indicating copy to clipboard operation
CanvasAPI copied to clipboard

POST calendar_events API endpoint not working

Open kylekyle opened this issue 8 years ago • 0 comments

I haven't had problems with any other API endpoints, but a POST to calendar_events through a command-line client (like pandarus) produces an error:

  {
    "message": "The specified resource does not exist."
  }

To reproduce:

require 'pandarus'

module Faraday
	class Adapter
		class NetHttp < Faraday::Adapter
			def ssl_verify_mode(ssl)
				OpenSSL::SSL::VERIFY_NONE
			end
		end
	end
end

client = Pandarus::Client.new(
	prefix: "https://canvas.instructure.com/api",
	token: 'CANVAS_API_TOKEN_HERE'
)
client.create_calendar_event(
	context_code: "course_XXXXXX",
	title: "Test"
)		

Until there is way to bulk create calendar events, this is the only option.

kylekyle avatar Jul 03 '17 05:07 kylekyle