Why grade value update API gives 400 JSON Binding Error for a null grade update?
Options

Vinodya.Bandara24
Posts: 11 🌱
Hi All,We are using the PUT API "/d2l/api/le/(version)/(orgUnitId)/grades/(gradeObjectId)/values/(userId)" to update an existing grade item with a null value. We are passing the following JSON object in the request body.{ "Comments": { "Content": "Comments.", "Type": "Text" }, "PrivateComments": { "Content": "Private comments", "Type": "Text" }, "GradeObjectType": 1, "PointsNumerator": null, "PointsDenominator": 45} When we submit the above request we are getting 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."} Any idea on how to fix this error or how to pass a null value for the grade item?
Tagged:
Answers
-
Hello @Vinodya Bandara It looks like you will have to add numeric value in place of NULL, as you are updating grade value. But I will check back with dev for further Information.
Thanks
Priyanka
-
-
Hello @Vinodya Bandara In this API grade values can only be used as decimal or numeric number. NULL can not be used as you are trying to update given value( using PUT) you can use decimal or numeric number but not Null. Or you can use 0 if you would like to.
Thanks
Priyanka
-
Noted. Thank you for the update @Priyanka Pathak!
Categories
- All Categories
- 6 Thought Leadership
- 7 Known and Fixed Issues
- 6 Product Roadmap
- 553 Archived
- 10 Accessibility
- 28 Community Corner
- 2 Welcome
- Updates
- Member Spotlights
- 4 Events
- 242 Development
- 746 Customer Enablement
- Evaluate - Assess Student Learning
- Get Comfortable with Brightspace
- Communicate - Engage with Your Students
- 1 Create - Set up your Brightspace course
- Action - Add or create student activities
- 26 Partners
- 8 Product News
- 2022
- 2022 Release Notes
- 2021 Release Notes
- 4 Training
- andycat