CanvasAPI
CanvasAPI copied to clipboard
POST calendar_events API endpoint not working
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.