Creating a custom gradebook column

Jump to solution
rancho
Community Member

I am brand new to the canvas api, but not apis.  This is not supposed to be hard, but I am stumped again.  I am trying to create a custom grade book column.  Here is the url I am trying to use on a POST

https://{my institution}.test.instructure.com/api/v1/courses/{my course id}/custom_gradebook_columns

 

Here is the json I am posting

{"teacher_notes":false,"title":"StudentsEmployees","position":0,"hidden":false,"read_only":true}
 
And here is my response from the api
{
    "errors": [
        {
            "message""column is missing"
        }
    ]
}
 
It almost is acting like I am trying to do a put and modify a custom column, but
I am not, I am doing a post.
 
Another thing is for this course on the grade book there is a grid, with the students
names in a column and then what looks like assignments in other columns. But when I
use the same url with a get all I get is an empty array. Is that because those
columns are not custom?
 
Thanks for reading this far.
 
 
 

 

 

Labels (2)
0 Likes
1 Solution
werner_huysman1
Community Participant

Hi,

you must include the "column" key in the json, like this:

{
   "column": {
      "title": "StudentsEmployees",
      "read_only": true
   }
}

View solution in original post