Get the start and end dates of a course session via API

In this article, we describe how to get the start and end dates of a course session with the help of LMS365 API endpoints. There are several ways to do this depending on whether you have the ID of the relevant course or course session, or no ID is provided.

In this article

 

Get the start and end dates of a session using the course ID

When you need to get the start and end dates of a course session and you have the ID of the relevant  course, do the following:

 

1. Go to https://api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.

 

2. Find the Courses section, expand it, find the GET method /odata/v2/Courses with the Returns the Course by Id description and then select Try it out in the top right corner.

 

2022-06-24_17_05_35-LMS365_API.png

 

3. Fill in the fields: for the Id field enter the ID of the course you want to get thу session's start and end dates, and for $expand enter CourseSessions. Using the course ID and the $expand query option, you won't need to make an additional search through the list of all courses of the tenant.

Select the Execute button to run the request.

 

2022-06-24_17_11_54-LMS365_API.png

 

4. Go to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field you will see the course of that specific ID and it sessions, including the data of the sessions' start and end dates. You can use the Download button to save the results of the API request in the .JSON format to your computer.

2022-06-24_17_17_32-LMS365_API.png

 

Get session start and end dates using the course session ID

The advantage of this method is that you get only the required information about the specific course session.

To get the start and end dates of a specific course session and you have the ID of this session, do the following:

 

1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.

 

2. Find the CourseSessions section, expand it, find the GET method /odata/v2/CourseSessions({Id}) with the Returns Course Session by id description and then select Try it out in the top left corner.

 

 

2022-07-06_19_00_51-LMS365_API.png

 

3. Fill in the key: Id field with the ID of the course session you want to find the start and end dates of.  

Select the Execute button to run the request.

 

2022-07-06_19_00_15-LMS365_API.png

 

4. Go to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field you will see the data related to this specific course session including its start and end dates.
  • You can use the Download button to save the results of the API request in the .JSON format to your computer.

2022-07-06_19_00_32-LMS365_API.png

 

 

Get session start and end dates with no course or course session ID

To get the start and end dates of a course session you don't have the course or course session ID of, follow the steps below:

 

1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.

 

2. Find the Courses section, expand it, find the GET method /odata/v2/Courses with the Return the list of Courses description and then select Try it out in the top left corner.

 

1218.png


3. In the $expand field type the CourseSessions query option parameter and click the Execute button to run the request.

1225.png

TIP   

You can use various query options parameters to control the data in the response by setting filters. When query options parameters are set, the response will contain additional data and details which you can use for search.

4. Go to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field you will see the list of courses of the tenant, including the course session information and start and end dates. You can use the Download button to save the results of the API request in the .JSON format to your computer.
  • Search via Ctrl+F for a specific course which you want to get the start and end dates of. 

    2022-06-24_16_54_37-LMS365_API.png

 

Was this article helpful?
0 out of 0 found this helpful

Comments

Article is closed for comments.