While trying to create a create a gradeObject (POST /d2l/api/le/(version)/(orgUnitId)/grades/) using the API vide OAuth 2.0, I receive the following error
{
"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."
}
Input JSON
{
"MaxPoints": 2.0,
"CanExceedMaxPoints": false,
"CategoryId": null,
"Name": "SoomoChapter2",
"ShortName": "sgc2",
"GradeType": "Numeric",
"GradeSchemeId": null,
"IsBonus": false,
"ExcludeFromFinalGradeCalculation": false
}
However, I am able to use the API vide OAuth 2.0 (GET /d2l/api/le/(version)/(orgUnitId)/grades/(gradeObjectId)) to retrieve a gradeObject created using the UI
{
"MaxPoints": 10.000000000,
"CanExceedMaxPoints": false,
"IsBonus": false,
"ExcludeFromFinalGradeCalculation": false,
"GradeSchemeId": null,
"GradeSchemeUrl": "/d2l/api/le/1.26/6972/grades/schemes/3",
"Id": 445,
"Name": "Soomo Chapter 1",
"ShortName": "soomo_chapter_1",
"GradeType": "Numeric",
"CategoryId": 0,
"Description": {
"Text": "",
"Html": ""
},
"Weight": 10.000000000,
"AssociatedTool": null
}
Any inputs of what am I doing wrong here?
Thanks!