public course index checkbox API

Jump to solution
mlewis23
Community Champion

While trying to edit the public course settings through the API we used the following call and parameters: 

'PUT /api/v1/courses/:id'

is_public, is_public_to_auth_users, public_syllabus, public_syllabus_to_auth

However, after setting all four of these settings to 'false', there is a checkbox on the Course Settings page within the course that remained checked:

'Include this course in the public course index'

Even though the visibility is set to 'Course' (is_public = false) the course remains on the course search page, I'm assuming because of that checkbox.

Has anyone else had this issue or found the parameter to edit that checkbox through the API?

 

thanks,

Matt

 

 

Labels (2)
0 Likes
1 Solution
James
Community Champion

Matt ( @mlewis23 )

The "Include this course in the public course index" is controlled by the course[indexed] parameter.

course[indexed]=0 will disable it

Alternatively, if you want to set your content-type to application/json, you can use

{
  "course": {
    "indexed": false
  }
}

This parameter is not documented, I opened up the developer tools in Chrome and watched what Canvas sent back to the server when I submitted the settings page.

View solution in original post

0 Likes