RestAPI Queries on Courses Possible?

Kyler.C.608
Kyler.C.608 Posts: 7 🔍

Howdy folks!

I'm starting to take a deeper dive into pulling data with REST and am starting to tackle a few items that would be easier to resolve with a quick query over doing some data combinations from DataHub.

Is it possible to use something like the below to return all courses for a specific semester?

{{BrightspaceDomain}}/d2l/api/lp/{{lpversion}}/courses/?Semester.Identifier=(semester code here)

I've tried several variations to pull back based on the Name, Code, and Start/End dates but keep bumping into a { Errors: [ {Message: "No scopes defined for specified requests."} ] } message. Running a flat GET with the OrgUnitId returns everything about a specific course no problem, so I don't think it's the scopes in my token causing me an issue. I'm suspecting I've got a syntax issue going on but I'm just not seeing it.

Thanks!

Kyler

Answers

  • Rusha.S.831
    Rusha.S.831 Posts: 114

    Hello @Kyler.C.608,

    Thank you for reaching out to us via Brightspace Community!

    When I check this document where all the APIs are mentioned - https://docs.valence.desire2learn.com/res/course.html , I couldn't find this particular call that you are trying to use. Could you please confirm if you found this API somewhere for further investigation please?

    Kind Regards,

    Rusha

  • Kyler.C.608
    Kyler.C.608 Posts: 7 🔍

    Hello Rusha!

    I was hoping that I could throw the variable in where the (orgUnitId) was located in the endpoint below, but I'm going to assume it's not that open to dig through. It'd be fantastic to be able to tap into this for more real time pull backs of courses with various status like IsTrue=false&StartDate< = {current date} < =EndDate to pull back courses that aren't active based on the start and end date ranges.

    Get /d2l/api/lp/(version)/courses/(orgUnitId)