Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8271209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:47:01+00:00 2026-06-08T06:47:01+00:00

I was curious as to whether anyone has successfully implemented in Java the route

  • 0

I was curious as to whether anyone has successfully implemented in Java the route in D2L using Valance as follows:

PUT /d2l/api/le/(D2LVERSION: version)/(D2LID: orgUnitId)/grades/(D2LID: gradeObjectId)/values/(D2LID: userId)

I have been struggling with receiving a 404 from this call when I have checked thoroughly that the required IDs match my records in D2L. When I log into D2L with the Instructor level account that I am using in Java I see that the Course, Test, and Participants are there. The IDs for these are used in the Java code to call the above route, but I receive a 404 and a grade is not updated.

Here is a snip of the code:

HttpURLConnection  connection = null ;

    try {
        uri = userContext.createAuthenticatedUri ("/d2l/api/le/1.0/"+courseId+"/grades/"+gradeId+"/values/"+ userId, "PUT");

        connection= (HttpURLConnection)uri.toURL().openConnection();
        connection.setDoOutput(true);
        connection.setRequestMethod("PUT");
        connection.setRequestProperty("Content-Type", "application/json");

        OutputStream os = connection.getOutputStream();
        String updatedScore = "{\"GradeObjectType\":1,\"PointsNumerator\":\"5\"}";
        os.write(updatedScore.getBytes());
        os.flush();

    }catch(Exception e){
        e.printStackTrace();
    }

The courseID, gradeID, and userID are being passed in and have been verified in the D2L Web UI.
As you can see, I have a JSON string being created for a GradeObjectType of 1 and a PointsNumerator of 5. Are there special permissions that this Instructor account must have beyond the default Instructor account permissions to permit such a call?

Any thoughts would be appreciated.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:47:03+00:00Added an answer on June 8, 2026 at 6:47 am
    1. (If you haven’t already) You could try making get calls to retrieve these values to ensure they are present and your basic logic is working.
    2. If you have access to a very priveleged account you could use that account to try to rule out permissions problems. Instructors that can set grades in the UI should be able to set grades via the API.

    update:

    An example of a successful request and response follows, perhaps you can identify differences:

    REQUEST:
    
    PUT https://valence.desire2learn.com/d2l/api/le/1.0/7574/grades/4852/values/3902?x_b=xDaPHeptaw9syoI1EGdeJ1&x_a=L2Hd9WvDTcyiyu5n2AEgpg&x_d=6U5NTYnTswz4gnu-vZHT3bajswsp3jvxYtwzoeOWKUs&x_c=a6f5hEMrvAxC6PS5UlSUOusVpj-XKnOBwxqhYg5pNtg&x_t=1343070852 HTTP/1.1
    Accept-Encoding: gzip,deflate
    Content-Type: application/json
    
    {
                    "GradeObjectType": 1,
                    "PointsNumerator": 9
    }
    
    
    RESPONSE:
    
    HTTP/1.1 200 OK
    Cache-Control: private
    Content-Length: 0
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    X-AspNet-Version: 2.0.50727
    Date: Mon, 23 Jul 2012 19:14:48 GMT
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just curious if anyone has had sufficient time with WinRT yet to understand whether
I was curious whether anyone has any suggestions for performance testing libraries and frontends
I am curious to know whether anyone out there have tried mixing node.js headless
I'm curious if it is possible to determine whether or not an Assembly has
Just curious to know if anyone has ever used gametutorials.com products for learning directX.
Curious whether folks have setup 2 way transactional replication on the tables ASP.NET uses
I am curious whether it is possible to determine the maximum size that an
When a popover shows, I'm curious whether it's possible to set the underlying settings
I was curious as to whether or not there exists a jQuery-style interface/library for
I'm curious, whether it is possible to separate echo area and minibuffer, so two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.