I'm working on Python code to transfer grades into D2L and am following:[Archived Content]...

Doug.Lundin5058
Doug.Lundin5058 Posts: 3 🌱
edited November 2022 in Social Groups

I'm working on Python code to transfer grades into D2L and am following:

[Archived Content] https://community.brightspace.com/s/article/API-Cookbook-Setting-a-grade-for-an-assignment?t=1635592638467

Using the API Test Tool and different data than was used in the cookbook, I can get through all the steps until I get to actually changing the grade value where I get a 404 error.

Can someone help me with this, please?

PUT /d2l/api/le/1.11/7419/grades/1902/values/141886/

Data:

{

"GradeObjectType": 1,

"PointsNumerator": 8

}

 

Comments

  • Stefanie.B.518
    Stefanie.B.518 Posts: 610 admin
    edited November 2022

    Hi @Doug Lundin​ 

    I'm not an API expert- but I did put your question to some folks I know who are.

    They've recommended the following

     

    Try:

     

    PUT /d2l/api/le/

    (

    version

    )

    /

    (

    orgUnitId

    )

    /grades/

    (

    gradeObjectId

    )

    /values/

    (

    userId

    )

     

    Based on what you've shared, they think you may be using a call to update the grade object, not the user’s value for the grade object.

  • Doug.Lundin5058
    Doug.Lundin5058 Posts: 3 🌱
    edited November 2022

    Hi Stefanie, thanks for the note. That is the same PUT request that I'm using. I think I figured out the problem, though. I took off the trailing "/" and it's now working with the API Test Tool.

     

    PUT /d2l/api/le/1.11/7419/grades/1902/values/141886

    Data:

    {

    "GradeObjectType": 1,

    "PointsNumerator": 8

    }