I was able to successfully test the PUT /results/{id} endpoint once before, but now cannot get it to work. I've validated the following:
- LineItem, Student, Class exist and are active in current term
- Student is enrolled in Class where LineItem is created
- Result score is within LineItem range
- ScoreDate is within GradingPeriod and after LineItem AssignDate
- Result ID does not belong to an existing object
I'm just getting 400 errors:
{
"statusInfoSet": [
{
"imsx_codeMajor": "failure",
"imsx_severity": "error"
}
]
}
This one has me stumped. Any ideas?
Here's what I have (included key attributes only):
LineItem:
{
"title": "Assignment Title 3"
"class": { "sourcedId": “cls-100-97086503” },
"category": { "sourcedId": "lic-100-2165" },
"gradingPeriod": { "sourcedId": “as-grp-100-16536” },
"assignDate": "2023-09-16T13:30:00Z",
"dueDate": "2023-09-29T13:30:00Z",
"resultValueMin": 0.0,
"resultValueMax": 100.0,
"sourcedId": "external-lineitem-sourcedId4"
}
Enrollment:
{
"user": { "sourcedId": “usr-100-6048211” },
"class": { "sourcedId": “cls-100-97086503” },
"role": "student",
"beginDate": "2023-08-28",
"endDate": "2023-12-29"
}
Result (attempted):
PUT https://api.sky.blackbaud.com/afe-rostr/ims/oneroster/v1p1/results/external-result-sourcedId2
{
"result": {
"scoreStatus": "fully graded",
"scoreDate": "2023-09-17T13:30:00Z",
"score": 70.0,
"comment": "Result comment",
"lineItem": {
"sourcedId": "external-lineitem-sourcedId4",
"href": "https://api.sky.blackbaud.com/afe-rostr/ims/oneroster/v1p1/lineItems/external-lineitem-sourcedId4",
"type": "lineItem"
},
"student": {
"sourcedId": "usr-100-6048211",
"href": "https://api.sky.blackbaud.com/afe-rostr/ims/oneroster/v1p1/users/usr-100-6048211",
"type": "user"
},
"sourcedId": "external-result-sourcedId2",
"status": "active",
"dateLastModified": "2023-09-17T13:30:00Z"
}
}