What is the proper format for making an AJAX PUT request?

I am trying to make an API call to set a specific Grade Value for a Learner. Here is the ajax call I am making to try and accomplish this.
$.ajax({
url: '/d2l/api/le/1.26/6711/grades/319/values/184',
type: 'PUT',
data: {
"Comments": { "Content": "", "Type": "Text" },
"PrivateComments": { "Content": "", "Type": "Text" },
"GradeObjectType": 3,
"Value": "Late"
}
});
The response from this call is always a 403 Forbidden Error. The message that comes with this error is 'Forbidden'. One question within the community focused on permissions issues being the culprit. I do not believe that is the case here. I am accessing the site as a Super Administrator. When I impersonate a Learner on this same page, I instead get a 403 Forbidden - Not Authorized message.
The other question I saw in the community mentioned that you must include the correct values in the data being sent. As you can see, I have emulated the structure of that question and the API Documentation, including the Comments and PrivateComments along with the GradeObjectType and Value.
I have tried making the call with quotes around the parameter names and without quotes. I have tried encapsulating it all in a GradeValue object, and without. I have tried with JSON.stringify and without, and every combination of the above things I could imagine. Still, I get a 403 Forbidden - Forbidden message.
I even took a detour. I successfully used GET to acquire the users ActivationData, then tried to PUT the exact same data back. The GET was successful, and the PUT gave 403 Forbidden - Forbidden.
$.ajax({
url: LPBaseRoute + '/users/' + 377 + '/activation',
type: 'GET'
}).done(function (returnedValue) {
$.ajax({
url: LPBaseRoute + '/users/' + 377 + '/activation',
type: 'PUT',
data: returnedValue
});
});
What am I doing wrong?
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