How to use PUT Requests on Postman to Update Course Offering Information

Rim.Z.380
Rim.Z.380 Posts: 7 🌱

Hello

I tried to use the PUT request documentation posted on Valence to update a course offering information, but it didn't work. I think I am not doing it correctly.

Can someone please provide me with a working example of how this PUT request looks like and how to update only specific course information? (For example Course Name, Code, Semester, etc.)

Thanks

Rim

Comments

  • Renee.J.194
    Renee.J.194 Posts: 121
    edited May 2024

    Hi, are your other put calls against LP working correctly? And what is your version of LP?

    You cannot update Semester with a PUT call. We don't really have PUT calls for modifying org structure, though I mightily wish we did.

    Here is the JSON you send with a PUT to update a course offering.

    {
        "Name": <string>,
        "Code": <string>,
        "StartDate": <string:UTCDateTime>|null,
        "EndDate": <string:UTCDateTime>|null,
        "IsActive": <boolean>,
        "Description": { <composite:RichTextInput> },
        "CanSelfRegister": <boolean>|null
    }
    

    Please note this comment regarding CanSelfRegister. "CanSelfRegister

    Whether or not a user can self-register this course. Null is treated as false. This is required as of API version of LP v1.27, but not supported on versions prior to v1.27." This is why I asked about your version of LP.