POST Create Grade Item

Justin.B.253
Justin.B.253 Posts: 35 🌱

I was in the wrong area when I posted this question the first time. Hopefully this time its being posted to the Development group. I have tried many combinations for sending data to create a gradebook item but I get the same error message. I have checked and rechecked the documentation and it appears to be correct. Anyone have a working json block for POST create grade item. I have all the correct permissions, the correct scope, my headers show content-type application/json, sending as raw json in body and with and without the // helper text. I'm using Postman.

POST /d2l/api/le/1.67/2978161/grades/

{
"MaxPoints": 10,
"IsBonus": false,
"ExcludeFromFinalGradeCalculation": true,
"GradeSchemeId": 6119,
"Name": "MidTerm Grade 1",
"ShortName": "MidTerm Grade 1",
"GradeObjectType": 3, // This is the correct field for SelectBox
"CategoryId": 0,
"Description": {
"Text": "This is a participation grade item.",
"Html": "<p>This is a participation grade item.</p>"
},
"IsHidden": true
}

Error message - { "type": "http://docs.valence.desire2learn.com/res/apiprop.html#json-binding-error", "title": "JSON Binding Error", "status": 400, "detail": "Provided JSON is invalid or does not match the expected format."}

Tagged:

Answers

  • Justin.B.253
    Justin.B.253 Posts: 35 🌱

    I have tried many combinations for sending data to create a gradebook item but I get the same error message. I have checked and rechecked the documentation and it appears to be correct. Anyone have a working json block for POST create grade item. I have all the correct permissions, the correct scope, my headers show content-type application/json, sending as raw json in body and with and without the // helper text. I'm using Postman.

    POST /d2l/api/le/1.67/2978161/grades/

    {
    "MaxPoints": 10,
    "IsBonus": false,
    "ExcludeFromFinalGradeCalculation": true,
    "GradeSchemeId": 6119,
    "Name": "MidTerm Grade 1",
    "ShortName": "MidTerm Grade 1",
    "GradeObjectType": 3, // This is the correct field for SelectBox
    "CategoryId": 0,
    "Description": {
    "Text": "This is a participation grade item.",
    "Html": "<p>This is a participation grade item.</p>"
    },
    "IsHidden": true
    }

    Error message - { "type": "http://docs.valence.desire2learn.com/res/apiprop.html#json-binding-error", "title": "JSON Binding Error", "status": 400, "detail": "Provided JSON is invalid or does not match the expected format."}