Is there a way to update the semester from a course using the API?

Guillermo.R.579
Guillermo.R.579 Posts: 3 🔍
edited November 22 in Corporate

I have only been able to target the semester using POST upon course creation but I'm not able to update a course semester using PUT

Tagged:

Answers

  • Hi @Guillermo.R.579,

    Thank you for reaching out in the Brightspace Community. 

    When you mentioned " I'm not able to update a course semester using PUT", are you referring to changing the semester that a course belongs to using API?

    If you can also provide more information regarding this that would be helpful in providing you the right information. 

    Kind regards, 

    Roqeeb. 

  • Hi! Yes, I was referring to changing the semester of a course. Let's say a have a course that looks like this:

    { "Identifier": "999", "Name": "NameCourse", "Code": "CodeCourse", "IsActive": true, "CanSelfRegister": false, "Description": { "Text": "", "Html": "" }, "Path": "/content/enforced/999-CodeCourse/", "StartDate": null, "EndDate": null, "CourseTemplate": { "Identifier": "12345", "Name": "NameTemplate", "Code": "CodeTemplate" }, "Semester": { "Identifier": "435", "Name": "NameSemester", "Code": "CodeSemester" }, "Department": { "Identifier": "7890", "Name": "NameDep", "Code": "CodeDep" }}

    And I just want to change the semester, so I would only be changing this part:

    "Semester": { "Identifier": "435", "Name": "NameSemester", "Code": "CodeSemester" }

    In postman I'm using this api call:

    PUT {{BrightspaceDomain}}/d2l/api/lp/{{lpversion}}/courses/999

    with this JSON body:

    "Semester": { "Identifier": 071 }

    But I keep getting this error:

    { "type": "http://docs.valence.desire2learn.com/res/apiprop.html#invalid-parameters", "title": "Invalid Parameters", "status": 400, "detail": "Request has missing or invalid parameters."}