API bulk grades by UserID call modifiedSince parameter implementation

Chase.T.770
Chase.T.770 Posts: 2 New Community Member
edited August 7 in Development

When trying to use GET /d2l/api/le/(version)/grades/values/(userId) with the optional modifiedSince parameter, I construct the following endpoint:

'/d2l/api/le/1.85/grades/values/12345?modifiedSince=2024-08-04T14:51:23.558Z'. However, the API returns only grade objects with a lastModifiedDate within 24 hours of the call, which is the default value. The status code is normal and the call is executed without errors as if the modifiedSince parameter was not included. How should I go about addressing this issue?

Tagged:

Answers

  • Furkan.K.312
    Furkan.K.312 Posts: 79 🤝🏼

    Hi @Chase .T.770,

    Thanks for your question!

    I tested the same API call with a slight change in the modifiedSince date and successfully retrieved results, including grade objects modified in 2024. This suggests that the modified Since parameter is being respected.

    Here's what I used:

    GET
    /d2l/api/le/1.85/grades/values/12345?modifiedSince=2024-09-01T14:51:23.558Z&pageSize=50

    image.png


    A few things I checked during the investigation:

    • Ensure your timestamp is in UTC format, including the Z at the end. In your case, it seems correct to me.
    • Double-check if the user (12345 in your example) has modified grade items after the specified timestamp. (I checked, and learner also exists)
    • Consider using the pageSize parameter to control how many results are returned per page.

    I hope this will help.

    Thank you