WPLMS API Endpoints

In this tutorial we’ll learn about the different endpoints wplms API has that can be used by app.

The wplms API uses the namespace : wplms/v1, using this with the endpoints we can get information from a wplms website.

Following are the endpoints (type=GET):

  1. track: The most important endpoint is the “track” endpoint because it gives all the changes made in the website with their timestamp, refer:
    You can also track the data via timestamp by adding “/?access=1502523502” where “1502523502” is the particular timestamp, refer:
  2. track/(?P<id>\\d+)?: You can track all the data related to a particular user by adding his/her id after track, refer:

    Similarly you can add “?access=1502523502” i.e. the timestamp to get the data of the user from a particular timesatmp.
  3. course: This endpoint gives you information of all the courses present in your wplms website, refer:
  4. course/(?P<id>\\d+)?: Using this endpoint you can get the data of a particular course using the course id, refer:
  5. course/featured: You can use this endpoint to get all the featured courses on the wplms website, refer:
  6. course/popular: You can use this endpoint to get all the popular courses from the wplms website, refer:
  7. course/filters(?P<filter>.+)?: This endpoint uses the json data as the url to fetch results, for example if you want to fetch the recent courses then use the json data in the url, refer:
  8. instructors: This endpoint is used for fetching all the instructors in the website, refer:
  9. instructors/(?P<instructor_id>\d+)?: You can also fetch the insformation of a single instructor from the website through the instructor id, refer:
  10. course/taxonomy(?P<taxonomy>.+)?: You can also fetch the information of taxonomy from the website like course-cat, level, location, etc., refer:
  11. course/category/(?P<id>\d+)?: You can also fetch the information of a particular course category through its id, refer:

 

Now there are user endpoints, these end points require the “Authorization” to be passed in the headers to fetch the information. You need to send the access token of the client as Authorization in the header which you can get from the connected clients in the API.

Following are the endpoints for users (Type=GET):

  1. user: This endpoint gives you the id of the user who is connected to the app i.e. the user who’s access token is sent in the headers, refer:
  2. user/profile: This endpoint fetches all the information or the data that is shown to the user in his/her profile page, like the user can see dashboard, courses, etc tabs in his/her profile, refer:
  3. user/profile/(?P<tab>\w+)?(&P<per_page>\d+)?(&P<paged>\d+): This endpoint lets you fetch the information according to particular tabs, you can also use “per_page=” to get limited information on a page, you can also add “paged=” to directly jump onto a particular page. For example if you want the information of tab profile then use the endpoint as namspace/user/profile/?tab=profile, refer:
  4. user/coursestatus/(?P<course>\d+)?: This endpoint can be used to get the full information of the course status page for the user who’s access token is sent in the header, in the endpoint you provide the course id to get the status for that particular course. It lets you know if the course has been expired for the user or if the user is continuing the course and all other information related to that particular course status for the particular user, refer:
  5. user/coursestatus/(?P<course>\d+)/item/(?P<id>\d+)?: This endpoint is similar to the previous one but it uses the course id and then the unit id who’s information you need for the particular user, refer:
  6. user/getreview/(?P<course>\d+): This endpoint is used to get the review of the user from a particular course by using the course id, refer:

Was this article helpful?

Related Articles

1 Comment

  1. Jeremy

    Hi,
    I’m trying to filter using the API using the Instructors filter. I did not locate documentation on this, but I am trying to figure it out by looking at the coding. Should I be entering:?

    filter={“search”:””,”filters”:[{“type”:”instructors”,”values”:”6450″}],”sort”:”popular”,”paged”:1}

    Encoded to:
    filter%3D%7B%22search%22%3A%22%22%2C%22filters%22%3A%5B%7B%22type%22%3A%22instructors%22%2C%22values%22%3A%226450%22%7D%5D%2C%22sort%22%3A%22popular%22%2C%22paged%22%3A1%7D

Leave A Comment?