Exporting Course information using API

Dale.G.287
Dale.G.287 Posts: 2 🌱
edited December 16 in Development

I have had success exporting "grades" information using the API but so far have not been able to export course information.

I have looked through the API documentation I can find and put together a GET string similar to what I use for grades that I thought should pull course information for a single course but it returns a 404 error.

Ideally I would like to export information for all courses rather than one course at a time.

Is this possible and would someone be able to point me in the right direction to achieve this ?

My current attempt is in this format with the portion for the district abbreviation replaced with x's.

GET https://xxxxxtest.brightspace.om/d2l/api/lp/1.67/courses/31714

Thank you.

Tagged:

Answers

  • Ajith.J.824
    Ajith.J.824 Posts: 11
    edited December 14

    Hi @Dale.G.287,

    Thank you for the question. It looks like you are using this API endpoint.
    Please note that API Version 1.67 is not available for this endpoint. Could you please try with 1.43?
    GET https://xxxxxtest.brightspace.om/d2l/api/lp/1.43/courses/31714

    You can get a list of child units for a provided org unit with this endpoint-
    GET /d2l/api/lp/1.43/orgstructure/(orgUnitId)/children/

    To get a list of Course Offerings only, you can set a filter with Query Parameter - ouTypeId. Here's an example-
    GET /d2l/api/lp/1.43/orgstructure/(orgUnitId)/children/?ouTypeId=3

    I hope this helps. Please let me know if you have any questions.

  • Dale.G.287
    Dale.G.287 Posts: 2 🌱

    Using the 1.43 endpoint changed the error from 404 to 403 Forbidden, so some progress.