OneRoster Result Create Issue

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"
}
}

Comments

  • @Michael Conan
    RESOLVED - issue was with lineItem.assignDate vs. result.scoreDate

  • @Michael Conan
    I've now tried to add a metadata property to the request, but it is not being accepted - no error this time, the value just does not show up in the result object.
    Here is how I've structured:
    "metadata": {
    "classroomLink": "https://classroom.google.com/link/to/submission"
    }

  • Stephen Boyle
    Stephen Boyle Blackbaud Employee
    Tenth Anniversary Kudos 5 First Reply Name Dropper

    Hi @Michael Conan,
    The Metadata object in the various record types is a way to pass information that is not part of the official OneRoster standard. An SIS that provides a OneRoster API would have to define exactly what information is supported in a Metadata object for each record type. The Blackbaud version of the OneRoster API does support some metadata, such as the address fields in the user/student/teacher endpoints. All the current metadata supported is for Get endpoints to support 3rd party integrations that need additional data to function properly. The sample response section includes sample metadata, so you can see what field names and data types are supported for a given endpoint.

    The results object has no metadata defined, for reading or writing.

Categories