Here is a script that will take a csv of course SIS IDs and update the default view for all of the SIS IDs to wiki pages. You can, of course, change the assignment of default view to any of the other parameters.
<SPAN class="comment token"># import gems</SPAN><BR /><SPAN class="keyword token">require</SPAN> <SPAN class="string token">'typhoeus'</SPAN><BR /><SPAN class="keyword token">require</SPAN> <SPAN class="string token">'json'</SPAN><BR /><SPAN class="keyword token">require</SPAN> <SPAN class="string token">'csv'</SPAN><BR /><BR />canvas_url <SPAN class="operator token">=</SPAN> <SPAN class="string token">''</SPAN> <SPAN class="comment token"><SPAN># put full canvas test url eg: </SPAN><A class="jive-link-external-small" href="https://school.test.instructure.com" rel="nofollow noopener noreferrer">https://school.test.instructure.com</A></SPAN><BR />canvas_token <SPAN class="operator token">=</SPAN> <SPAN class="string token">''</SPAN> <SPAN class="comment token"># put canvas API token here' </SPAN><BR />csv_file <SPAN class="operator token">=</SPAN> <SPAN class="string token">''</SPAN> <SPAN class="comment token"># full path to csv file eg: full/path/to/file/api_courses.csv</SPAN><BR />default_view <SPAN class="operator token">=</SPAN> <SPAN class="string token">"wiki"</SPAN> <SPAN class="comment token">#can also use other parameters such as feed, modules, syllabus, assignments</SPAN><BR /><BR /><BR /><SPAN class="token constant">CSV</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">foreach</SPAN><SPAN class="punctuation token">(</SPAN>csv_file<SPAN class="punctuation token">,</SPAN> headers<SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">do</SPAN> <SPAN class="operator token">|</SPAN>row<SPAN class="operator token">|</SPAN><BR /> sis_course_id <SPAN class="operator token">=</SPAN> row<SPAN class="punctuation token">[</SPAN><SPAN class="string token">'course_id'</SPAN><SPAN class="punctuation token">]</SPAN><BR /><BR /><BR /> update_course <SPAN class="operator token">=</SPAN> <SPAN class="token constant">Typhoeus</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="symbol token">:Request</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="keyword token">new</SPAN><SPAN class="punctuation token">(</SPAN><BR /> <SPAN class="string token">"<SPAN class="interpolation token"><SPAN class="delimiter token tag">#{</SPAN>canvas_url<SPAN class="delimiter token tag">}</SPAN></SPAN>/api/v1/courses/sis_course_id:<SPAN class="interpolation token"><SPAN class="delimiter token tag">#{</SPAN>sis_course_id<SPAN class="delimiter token tag">}</SPAN></SPAN>"</SPAN><SPAN class="punctuation token">,</SPAN><BR /> headers<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> authorization<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Bearer <SPAN class="interpolation token"><SPAN class="delimiter token tag">#{</SPAN>canvas_token<SPAN class="delimiter token tag">}</SPAN></SPAN>"</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN><BR /> method<SPAN class="punctuation token">:</SPAN> <SPAN class="symbol token">:put</SPAN><SPAN class="punctuation token">,</SPAN><BR /> params<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN><BR /> <SPAN class="string token">"course[default_view]"</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> default_view<BR /> <SPAN class="punctuation token">}</SPAN><BR /> <SPAN class="punctuation token">)</SPAN><BR /> update_course<SPAN class="punctuation token">.</SPAN>on_complete <SPAN class="keyword token">do</SPAN> <SPAN class="operator token">|</SPAN>response<SPAN class="operator token">|</SPAN><BR /> <SPAN class="keyword token">if</SPAN> response<SPAN class="punctuation token">.</SPAN>code <SPAN class="operator token">==</SPAN> <SPAN class="number token">200</SPAN><BR /> data <SPAN class="operator token">=</SPAN> <SPAN class="token constant">JSON</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">parse</SPAN><SPAN class="punctuation token">(</SPAN>response<SPAN class="punctuation token">.</SPAN>body<SPAN class="punctuation token">)</SPAN><BR /> puts <SPAN class="string token">"The course_id <SPAN class="interpolation token"><SPAN class="delimiter token tag">#{</SPAN>sis_course_id<SPAN class="delimiter token tag">}</SPAN></SPAN> has been updated."</SPAN><BR /> <SPAN class="keyword token">else</SPAN><BR /> puts <SPAN class="string token">"Something went wrong! Response code was <SPAN class="interpolation token"><SPAN class="delimiter token tag">#{</SPAN>response<SPAN class="punctuation token">.</SPAN>code<SPAN class="delimiter token tag">}</SPAN></SPAN>"</SPAN><BR /> <SPAN class="keyword token">end</SPAN><BR /> <SPAN class="keyword token">end</SPAN><BR /> update_course<SPAN class="punctuation token">.</SPAN>run<BR /><SPAN class="keyword token">end</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>