API to create parent/guardian relationship with student not working

Steve.T.444
Steve.T.444 Posts: 5 🌱
edited May 2023 in Development

I'm not able to make the PUT /d2l/api/bfp/(version)/relationships/ API (https://docs.valence.desire2learn.com/res/user.html#put--d2l-api-bfp-(version)-relationships-) to create a parent/guardian and student relationship between a Student and Guardian.

My PUT request goes to https://my-instance.brightspace.com/d2l/api/bfp/1.0/relationships/ and contains a JSON body:

{
   "userMappings": [
       {
           "ParentId": "54881",
           "ChildId": "54880"
       }
   ]
}

The response returns a 404 with the body:

{"Errors":[{"Message":"Resource Not Found"}]}

My application's role has full permissions, and has been granted the appropriate permissions (according to https://community.d2l.com/brightspace/kb/articles/4560-brightspace-parent-guardian-permissions) The application also has the See Parent/Guardian Child Relationships for 'Guardian'/'Student' role interactions set.

I receive the same response for any valid-JSON body, so I suspect it's a larger permission or configuration problem somewhere, but I'm not sure where else to look.

Does anyone have suggestions?

Tagged:

Answers

  • Hello @SteveTherrien,

    Have you tried removing the double quotes around the D2LIDs for ParentID and ChildID? Those are integers rather than strings so the quotes could be causing an issue.

  • Steve.T.444
    Steve.T.444 Posts: 5 🌱

    Hi, thanks for the response.

    The API calls for it to be a string (<string:D2LID>), but I've tried it both ways and get the same response.

    I've also confirmed the Brightspace Parent & Guardian setting under Organization Tools is enabled. I'm not sure if there's another setting tucked away somewhere that also needs to be turned on.

  • Julie.L.787
    Julie.L.787 Posts: 296 ⏸️ Inactive

    Hi @SteveTherrien ,

    We would love to take a closer look at your specific site setup. In order to be able to do this, we recommend you create a support ticket so that we can investigate further. Thanks!

  • Steve.T.444
    Steve.T.444 Posts: 5 🌱

    Hi @Julie Low558,

    Our ASC submitted the request, as case number 01765674.

  • Steve.T.444
    Steve.T.444 Posts: 5 🌱

    As a follow-up:

    There was an issue with how our instance was setup which caused the parent API to fail, but D2L was able to resolve it.

  • Paul.F.779
    Paul.F.779 Posts: 7 🌱

    I am getting the same issue. How was this resolved, exactly?

  • Steve.T.444
    Steve.T.444 Posts: 5 🌱

    @Paul.F.779, sorry, I wasn't given any specifics. Only that the problem was outside our site and was something only they could fix.

    I asked our ASC, and he said:

    > It sounded like the permissions were not enabled on the tool (their words) at a higher level so even though we had it turned on, it was not actually on for us.

    I suspect you'll need to submit a request for them to investigate. Our case number was 01765674; maybe D2L left some internal notes.

    We noticed the Relationships tab in a user profile was missing before the fix was applied and started appearing after. If the same is happening for you, then this could be the same problem.