If you are a .NET developer and are interested in leveraging the Canvas API to automate tasks at your institution, you might be interested in ths demo project. I will provide a Visual Studio project that you can download and use as starting point to develop your own tools.
I can try to guide you to some reference material for those getting started that will hopefully help.
There are a few basics that would help to understand when working with the associated project:
These strings will be parsed and passed to the API library where they will be converted into actual calls to the Canvas API, at the site defined by the "apiUrl" variable.
This sample config includes GET, POST, and PUT calls, to demonstrate each type of verb.
Each verb is implemented in the base class: clsHttpMethods.cs
Full response details are logged by NLog. Grab these responses and inspect them for full details. If your test produces an error or throws an exception, full details can also be found in the log file. If you use my default nlog.config, log files will be found in this location: c:\\logs\canvasApiTest\*.log
The purpose of this project is not to replace tools like Postman, the purpose is to help other developers using .NET to get started with the API. I tried to keep things as clear as possible.
With myapi.config, I have been able to test any API call I have needed to date. If you follow my code, you will need to add a C# method to handle each additional API call you want to make. My "long hand" approach to creating matching C# methods could be modified, but hopefully helps to illustrate the concepts. Share your approaches.
There is plenty of room for optimization, optimize to meet your needs and share any enhancements you feel people could benefit from.
The source published on BitBucket compiles and runs with Visual Studio 2015 and .NET Framework 4.5.2
IMPORTANT: Make sure you edit the myapi.config file with your settings, and modify API variable values to match your environment.
All code is provided as-is for demonstration purposes only.
2016.12.03 - UPDATE - File Upload via POST
I have added a class that walks through the steps of uploading a file. This code was pulled from another project and put together quickly as a response to a community question, make sure you test failure scenarios in your environment.