LMS API Endpoints

Table of Contents

Retrieve a User

– Endpoint:

GET /wp/v2/users/

– Example:

$ curl https://uvmlms.com/wp-json/wp/v2/users/

– Arguments:

1- id: Unique identifier for the user.

2- context: Scope under which the request is made; determines fields present in response. The value is one of (view, embed, edit). Default: view.

– Response Schema (json):

1- id (integer): Unique identifier for the user. (Context: embed, view, edit)

2- username (string): Login name for the user. (Context: edit)

3- name (string): Display name for the user. (Context: embed, view, edit)

4- first_name (string): First name for the user. (Context: edit)

5- last_name (string): Last name for the user. (Context: edit)

6- email (string,email): The email address for the user. (Context: edit)

7- url (string,uri): URL of the user. (Context: embed, view, edit)

8- description (string): Description of the user. (Context: embed, view, edit)

9- link (string,uri): Author URL of the user. (Context: embed, view, edit)

10- locale (string): Locale for the user. (Context: edit) (ex: en_US)

11- nickname (string): The nickname for the user. (Context: edit)

12- slug (string): An alphanumeric identifier for the user. (Context: embed, view, edit)

13- registered_date (string,datetime): Registration date for the user. (Context: edit)

14- roles (array): Roles assigned to the user.  (Context: edit)

15- capabilities (object): All capabilities assigned to the user. (Context: edit)

16- extra_capabilities (object): Any extra capabilities assigned to the user. (Context: edit)

17- avatar_urls (object): Avatar URLs for the user. (Context: embed, view, edit)

18- meta (object): Meta fields. (Context: view, edit)

Create a User

– Endpoint:

POST /wp/v2/users

– Example:

$ curl https://uvmlms.com/wp-json/wp/v2/users

– Arguments:

1- username: Login name for the user. (Required)

2- name: Display name for the user.

3- first_name: First name for the user.  (Recommended)

4- last_name: Last name for the user.  (Recommended)

5- email: The email address for the user. (Required)

6- url: URL of the user.

7- description: Description of the user.

8- locale: Locale for the user. (ex: en_US)

9- nickname: The nickname for the user.

10- slug: An alphanumeric identifier for the user.

11- roles: Roles assigned to the user.

12- password: Password for the user. (Required)

13- meta: Meta fields.

 

– Response Schema (json):

1- id (integer): Unique identifier for the user. (Context: embed, view, edit)

2- username (string): Login name for the user. (Context: edit)

3- name (string): Display name for the user. (Context: embed, view, edit)

4- first_name (string): First name for the user. (Context: edit)

5- last_name (string): Last name for the user. (Context: edit)

6- email (string,email): The email address for the user. (Context: edit)

7- url (string,uri): URL of the user. (Context: embed, view, edit)

8- description (string): Description of the user. (Context: embed, view, edit)

9- link (string,uri): Author URL of the user. (Context: embed, view, edit)

10- locale (string): Locale for the user. (Context: edit) (ex: en_US)

11- nickname (string): The nickname for the user. (Context: edit)

12- slug (string): An alphanumeric identifier for the user. (Context: embed, view, edit)

13- registered_date (string,datetime): Registration date for the user. (Context: edit)

14- roles (array): Roles assigned to the user.  (Context: edit)

15- capabilities (object): All capabilities assigned to the user. (Context: edit)

16- extra_capabilities (object): Any extra capabilities assigned to the user. (Context: edit)

17- avatar_urls (object): Avatar URLs for the user. (Context: embed, view, edit)

18- meta (object): Meta fields. (Context: view, edit)

Update a User

– Endpoint:

POST /wp/v2/users/

– Example:

$ curl https://uvmlms.com/wp-json/wp/v2/users/

– Arguments:

1- id: Unique identifier for the user.

2- username: Login name for the user.

3- name: Display name for the user.

4- first_name: First name for the user.

5- last_name: Last name for the user.

6- email: The email address for the user.

7- url: URL of the user.

8- description: Description of the user.

9- locale: Locale for the user. (ex: en_US)

10- nickname: The nickname for the user.

11- slug: An alphanumeric identifier for the user.

12- roles: Roles assigned to the user.

13- password: Password for the user.

14- meta: Meta fields.

– Response Schema (json):

1- id (integer): Unique identifier for the user. (Context: embed, view, edit)

2- username (string): Login name for the user. (Context: edit)

3- name (string): Display name for the user. (Context: embed, view, edit)

4- first_name (string): First name for the user. (Context: edit)

5- last_name (string): Last name for the user. (Context: edit)

6- email (string,email): The email address for the user. (Context: edit)

7- url (string,uri): URL of the user. (Context: embed, view, edit)

8- description (string): Description of the user. (Context: embed, view, edit)

9- link (string,uri): Author URL of the user. (Context: embed, view, edit)

10- locale (string): Locale for the user. (Context: edit) (ex: en_US)

11- nickname (string): The nickname for the user. (Context: edit)

12- slug (string): An alphanumeric identifier for the user. (Context: embed, view, edit)

13- registered_date (string,datetime): Registration date for the user. (Context: edit)

14- roles (array): Roles assigned to the user.  (Context: edit)

15- capabilities (object): All capabilities assigned to the user. (Context: edit)

16- extra_capabilities (object): Any extra capabilities assigned to the user. (Context: edit)

17- avatar_urls (object): Avatar URLs for the user. (Context: embed, view, edit)

18- meta (object): Meta fields. (Context: view, edit)

 

Assign this user to a Course

– Endpoint:

POST /ldlms/v2/users//courses

– Example:

$ curl https://uvmlms.com/wp-json/ldlms/v2/users//courses

– Arguments:

1- id: Unique identifier for the user. (Required)

2- course_ids: Course ID(s) to add to User. (Required)

– Response Schema (json):

1- date (string, null, datetime): The date the object was published, in the site’s timezone. (Context: view, edit, embed)

2- date_gmt (string, null, datetime): The date the object was published, as GMT. (Context: view, edit)

3- guid (object): The globally unique identifier for the object. (Context: view, edit)

4- id (integer): Unique identifier for the object. (Context: view, edit, embed)

5- link (string, uri): URL to the object. (Context: view, edit, embed)

6- modified (string, datetime): The date the object was last modified, in the site’s timezone. (Context: view, edit)

7- modified_gmt (string, datetime): The date the object was last modified, as GMT. (Context: view, edit)

8- slug (string): An alphanumeric identifier for the object unique to its type. (Context: view, edit, embed)

9- status (string): A named status for the object.(Context: view, edit) (value is one of: publish, future, draft, pending, private, graded, not_graded)

10- type (string): Type of Post for the object. (Context: view, edit, embed)

11- password (string): A password to protect access to the content and excerpt. (Context: edit)

12- permalink_template (string): Permalink template for the object. (Context: edit)

13- generated_slug (string): Slug automatically generated from the object title. (Context: edit)

14- title (object): The title for the object. (Context: view, edit, embed)

15- content (object): The content for the object. (Context: view, edit)

16- author (integer): The ID for the author of the object. (Context: view, edit, embed)

17- featured_media (integer): The ID of the featured media for the object. (Context: view, edit, embed)

18- comment_status (string): Whether or not comments are open on the object. (Context: view, edit) (value is one of: open, closed)

19- ping_status (string): Whether or not the object can be pinged. (Context: view, edit) (value is one of: open, closed)

20- menu_order (integer): The order of the object in relation to other object of its type. (Context: view, edit)

21- template (string): The theme file to use to display the object. (Context: view, edit)

22- categories (array): The terms assigned to the object in the category taxonomy. (Context: view, edit)

23- tags (array): The terms assigned to the object in the post_tag taxonomy. (Context: view, edit)

24- ld_course_category (array): The terms assigned to the object in the ld_course_category taxonomy. (Context: view, edit)

25- ld_course_tag (array): The terms assigned to the object in the ld_course_tag taxonomy. (Context: view, edit)

26- materials_enabled (boolean): Materials Eabled. (Context: view, edit)

27- materials (string): Materials. (Context: view, edit)

28- certificate (integer): Course Certificate. (Context: view, edit)

29- disable_content_table (boolean): Disable Course Content Table. (Context: view, edit)

30- lessons_per_page (boolean): Custom Pagination. (Context: view, edit)

31- lesson_per_page_custom (integer): Lessons per page. (Context: view, edit)

32- topic_per_page_custom (integer): Topics per page. (Context: view, edit)

33- price_type (string): Course Price Type. (Context: view, edit) (value is one of: open, closed, free, buynow, subscribe)

34- price_type_paynow_price (string): Pay Now Course Price. (Context: view, edit)

35- price_type_subscribe_price (string): Subscribe Course Price. (Context: view, edit)

36- price_type_closed_price (string): Closed Course Price. (Context: view, edit)

37- price_type_closed_custom_button_url (string): Closed Course Button URL. (Context: view, edit)

38- prerequisite_enabled (boolean): Course Prerequisites. (Context: view, edit)

39- prerequisite_compare (string): Prerequisite Compare Mode. (Context: view, edit) (value is one of: ANY, ALL)

40- prerequisites (array): Prerequisites. (Context: view, edit)

41- points_enabled (boolean): Course Points. (Context: view, edit)

42- points_access (float): Required for Access. (Context: view, edit)

43- points_amount (float): Awarded on Completion. (Context: view, edit)

44- progression_disabled (boolean): Course Progression Disabled. (Context: view, edit)

Remove the user from the Course:

– Endpoint:

DELETE /ldlms/v2/users//courses

– Example:

$ curl -X DELETE https://uvmlms.com/wp-json/ldlms/v2/users//courses

– Arguments:

1- id: Unique identifier for the user. (Required)

2- course_ids: Course ID(s) to add to User. (Required)

– Response Schema (json):

1- date (string, null, datetime): The date the object was published, in the site’s timezone. (Context: view, edit, embed)

2- date_gmt (string, null, datetime): The date the object was published, as GMT. (Context: view, edit)

3- guid (object): The globally unique identifier for the object. (Context: view, edit)

4- id (integer): Unique identifier for the object. (Context: view, edit, embed)

5- link (string, uri): URL to the object. (Context: view, edit, embed)

6- modified (string, datetime): The date the object was last modified, in the site’s timezone. (Context: view, edit)

7- modified_gmt (string, datetime): The date the object was last modified, as GMT. (Context: view, edit)

8- slug (string): An alphanumeric identifier for the object unique to its type. (Context: view, edit, embed)

9- status (string): A named status for the object.(Context: view, edit) (value is one of: publish, future, draft, pending, private, graded, not_graded)

10- type (string): Type of Post for the object. (Context: view, edit, embed)

11- password (string): A password to protect access to the content and excerpt. (Context: edit)

12- permalink_template (string): Permalink template for the object. (Context: edit)

13- generated_slug (string): Slug automatically generated from the object title. (Context: edit)

14- title (object): The title for the object. (Context: view, edit, embed)

15- content (object): The content for the object. (Context: view, edit)

16- author (integer): The ID for the author of the object. (Context: view, edit, embed)

17- featured_media (integer): The ID of the featured media for the object. (Context: view, edit, embed)

18- comment_status (string): Whether or not comments are open on the object. (Context: view, edit) (value is one of: open, closed)

19- ping_status (string): Whether or not the object can be pinged. (Context: view, edit) (value is one of: open, closed)

20- menu_order (integer): The order of the object in relation to other object of its type. (Context: view, edit)

21- template (string): The theme file to use to display the object. (Context: view, edit)

22- categories (array): The terms assigned to the object in the category taxonomy. (Context: view, edit)

23- tags (array): The terms assigned to the object in the post_tag taxonomy. (Context: view, edit)

24- ld_course_category (array): The terms assigned to the object in the ld_course_category taxonomy. (Context: view, edit)

25- ld_course_tag (array): The terms assigned to the object in the ld_course_tag taxonomy. (Context: view, edit)

26- materials_enabled (boolean): Materials Eabled. (Context: view, edit)

27- materials (string): Materials. (Context: view, edit)

28- certificate (integer): Course Certificate. (Context: view, edit)

29- disable_content_table (boolean): Disable Course Content Table. (Context: view, edit)

30- lessons_per_page (boolean): Custom Pagination. (Context: view, edit)

31- lesson_per_page_custom (integer): Lessons per page. (Context: view, edit)

32- topic_per_page_custom (integer): Topics per page. (Context: view, edit)

33- price_type (string): Course Price Type. (Context: view, edit) (value is one of: open, closed, free, buynow, subscribe)

34- price_type_paynow_price (string): Pay Now Course Price. (Context: view, edit)

35- price_type_subscribe_price (string): Subscribe Course Price. (Context: view, edit)

36- price_type_closed_price (string): Closed Course Price. (Context: view, edit)

37- price_type_closed_custom_button_url (string): Closed Course Button URL. (Context: view, edit)

38- prerequisite_enabled (boolean): Course Prerequisites. (Context: view, edit)

39- prerequisite_compare (string): Prerequisite Compare Mode. (Context: view, edit) (value is one of: ANY, ALL)

40- prerequisites (array): Prerequisites. (Context: view, edit)

41- points_enabled (boolean): Course Points. (Context: view, edit)

42- points_access (float): Required for Access. (Context: view, edit)

43- points_amount (float): Awarded on Completion. (Context: view, edit)

44- progression_disabled (boolean): Course Progression Disabled. (Context: view, edit)

 

List User Course Progress

– Endpoint:

GET /ldlms/v2/users//course-progress

– Example:

$ curl https://uvmlms.com/wp-json/ldlms/v2/users//course-progress

– Arguments:

1- id: Unique identifier for the user. (Required)

2- context: Scope under which the request is made; determines fields present in response. The value is one of (view). Default: view.

3- exclude: Ensure result set excludes specific course IDs.

4- include: Limit result set to specific course IDs.

5- per_page: Maximum number of items to be returned in the result set. Default: 10

6- page: Current page of the collection. Default: 1

– Response Schema (json):

1- course (integer): Course ID. (Context: embed, view)

2- progress_status (string): Course Progress Status. (Context: embed, view) (value is one of: not-started, in-progress, completed)

3- last_step (integer): Last completed step. (Context: embed, view)

4- steps_completed (integer): Total completed steps. (Context: view)

5- steps_total (integer): Total Course steps. (Context: view)

6- date_started (string, null, datetime): Date started. (Context: view)

7- date_completed (string, null, datetime): Date completed. (Context: view)

Retrieve a User Course Progress Steps

– Endpoint:

GET /ldlms/v2/users//course-progress//steps

– Example:

$ curl https://uvmlms.com/wp-json/ldlms/v2/users//course-progress//steps

– Arguments:

1- id: Unique identifier for the user. (Required)

2- course: Unique Course identifier. (Required)

– Response Schema (json):

1- step (integer): Step ID. (Context: embed, view)

2- post_type (string): Post type for step. (Context: view)

3- progress_status (string): Course Progress Status. (Context: embed, view) (value is one of: not-started, in-progress, completed)

4- date_started (string, null, datetime): Date started. (Context: view)

5- date_completed (string, null, datetime): Date completed. (Context: view)

 

List User Quiz Progress

– Endpoint:

GET /ldlms/v2/users//quiz-progress

– Example:

$ curl https://uvmlms.com/wp-json/ldlms/v2/users//quiz-progress

– Arguments:

1- id: Unique identifier for the user. (Required)

2- quiz: Limit results to be within a specific Quiz. Required for non-admin users.

3- course: Limit results to be within a specific Course. Required for non-admin users.

4- lesson: Limit results to be within a specific Lesson. Pass zero to show global Course Quizzes. Must be used with Course parameter.

5- topic: Limit results to be within a specific Topic. Must be used with Course parameter.

6- context: Scope under which the request is made; determines fields present in response. The value is one of (view, embed, edit). Default: view.

7- orderby: The result order. The value is one of (taken, title, id, date). Default: taken.

8- offset: Offset the result set by a specific number of items.

9- order: Order sort attribute ascending or descending.The value is one of (asc, desc). Default: asc.

10- per_page: Maximum number of items to be returned in the result set. Default: 10

11- page: Current page of the collection. Default: 1

12- search: Limit results to those matching a string.

– Response Schema (json):

1- quiz (integer): Quiz ID. (Context: embed, view)

2- course (integer): Course ID. (Context: embed, view)

3- lesson (integer): Lesson ID. (Context: embed, view)

4- topic (integer): Topic ID. (Context: embed, view)

5- user (integer): User ID. (Context: embed, view)

6- percentage (number): Percentage passed. (Context: view)

7- timespent (number): Timespent. (Context: view)

8- has_graded (boolean): Has Graded. (Context: view)

9- started (string, null, datetime): Started timestamp. (Context: view)

10- completed (string, null, datetime): Completed timestamp. (Context: view)

11- points_scored (integer): Points scored. (Context: view)

12- points_total (integer): Points total. (Context: view)

13- statistic (integer): Statistic ID. (Context: view)

 

List Courses

Query this endpoint to retrieve a collection of courses. The response you receive can be controlled and filtered using the URL query parameters below.

– Endpoint:

GET /ldlms/v2/sfwd-courses

– Example:

$ curl https://uvmlms.com/wp-json/ldlms/v2/sfwd-courses

– Arguments:

  1. context: Scope under which the request is made; determines fields present in response. The value is one of (view, embed, edit). Default: view.
  2. page: Current page of the collection. Default: 1
  3. per_page: Maximum number of items to be returned in the result set. Default: 10
  4. search: Limit results to those matching a string.
  5. after: Limit response to posts published after a given ISO8601 compliant date.
  6. modified_after: Limit response to posts modified after a given ISO8601 compliant date.
  7. author: Limit result set to posts assigned to specific authors.
  8. author_exclude: Ensure result set excludes posts assigned to specific authors.
  9. before: Limit response to posts published before a given ISO8601 compliant date.
  10. modified_before: Limit response to posts modified before a given ISO8601 compliant date.
  11. exclude: Ensure result set excludes specific IDs.
  12. include: Limit result set to specific IDs.
  13. menu_order: Limit result set to posts with a specific menu_order value.
  14. offset: Offset the result set by a specific number of items.
  15. order: Order sort attribute ascending or descending.The value is one of (asc, desc). Default: asc.
  16. orderby: The result order. The value is one of (author, date, id, include, modified, parent, relevance, slug, include_slugs, title, menu_order). Default: title.
  17. slug: Limit result set to posts with one or more specific slugs.
  18. status: Limit result set to posts assigned one or more statuses. Default: publish.
  19. tax_relation: Limit result set based on relationship between multiple taxonomies. The value is one of (AND, OR).
  20. categories: Limit result set to items with specific terms assigned in the categories taxonomy.
  21. categories_exclude: Limit result set to items except those with specific terms assigned in the categories taxonomy.
  22. tags: Limit result set to items with specific terms assigned in the tags taxonomy.
  23. tags_exclude: Limit result set to items except those with specific terms assigned in the tags taxonomy.
  24. ld_course_category: Limit result set to items with specific terms assigned in the ld_course_category taxonomy.
  25. ld_course_category_exclude: Limit result set to items except those with specific terms assigned in the ld_course_category taxonomy.
  26. ld_course_tag: Limit result set to items with specific terms assigned in the ld_course_tag taxonomy.
  27. ld_course_tag_exclude: Limit result set to items except those with specific terms assigned in the ld_course_tag taxonomy.

– Response Schema (json):

1- date (string, null, datetime): The date the object was published, in the site’s timezone. (Context: view, edit, embed)

2- date_gmt (string, null, datetime): The date the object was published, as GMT. (Context: view, edit)

3- guid (object): The globally unique identifier for the object. (Context: view, edit)

4- id (integer): Unique identifier for the object. (Context: view, edit, embed)

5- link (string, uri): URL to the object. (Context: view, edit, embed)

6- modified (string, datetime): The date the object was last modified, in the site’s timezone. (Context: view, edit)

7- modified_gmt (string, datetime): The date the object was last modified, as GMT. (Context: view, edit)

8- slug (string): An alphanumeric identifier for the object unique to its type. (Context: view, edit, embed)

9- status (string): A named status for the object.(Context: view, edit) (value is one of: publish, future, draft, pending, private, graded, not_graded)

10- type (string): Type of Post for the object. (Context: view, edit, embed)

11- password (string): A password to protect access to the content and excerpt. (Context: edit)

12- permalink_template (string): Permalink template for the object. (Context: edit)

13- generated_slug (string): Slug automatically generated from the object title. (Context: edit)

14- title (object): The title for the object. (Context: view, edit, embed)

15- content (object): The content for the object. (Context: view, edit)

16- author (integer): The ID for the author of the object. (Context: view, edit, embed)

17- featured_media (integer): The ID of the featured media for the object. (Context: view, edit, embed)

18- comment_status (string): Whether or not comments are open on the object. (Context: view, edit) (value is one of: open, closed)

19- ping_status (string): Whether or not the object can be pinged. (Context: view, edit) (value is one of: open, closed)

20- menu_order (integer): The order of the object in relation to other object of its type. (Context: view, edit)

21- template (string): The theme file to use to display the object. (Context: view, edit)

22- categories (array): The terms assigned to the object in the category taxonomy. (Context: view, edit)

23- tags (array): The terms assigned to the object in the post_tag taxonomy. (Context: view, edit)

24- ld_course_category (array): The terms assigned to the object in the ld_course_category taxonomy. (Context: view, edit)

25- ld_course_tag (array): The terms assigned to the object in the ld_course_tag taxonomy. (Context: view, edit)

26- materials_enabled (boolean): Materials Eabled. (Context: view, edit)

27- materials (string): Materials. (Context: view, edit)

28- certificate (integer): Course Certificate. (Context: view, edit)

29- disable_content_table (boolean): Disable Course Content Table. (Context: view, edit)

30- lessons_per_page (boolean): Custom Pagination. (Context: view, edit)

31- lesson_per_page_custom (integer): Lessons per page. (Context: view, edit)

32- topic_per_page_custom (integer): Topics per page. (Context: view, edit)

33- price_type (string): Course Price Type. (Context: view, edit) (value is one of: open, closed, free, buynow, subscribe)

34- price_type_paynow_price (string): Pay Now Course Price. (Context: view, edit)

35- price_type_subscribe_price (string): Subscribe Course Price. (Context: view, edit)

36- price_type_closed_price (string): Closed Course Price. (Context: view, edit)

37- price_type_closed_custom_button_url (string): Closed Course Button URL. (Context: view, edit)

38- prerequisite_enabled (boolean): Course Prerequisites. (Context: view, edit)

39- prerequisite_compare (string): Prerequisite Compare Mode. (Context: view, edit) (value is one of: ANY, ALL)

40- prerequisites (array): Prerequisites. (Context: view, edit)

41- points_enabled (boolean): Course Points. (Context: view, edit)

42- points_access (float): Required for Access. (Context: view, edit)

43- points_amount (float): Awarded on Completion. (Context: view, edit)

44- progression_disabled (boolean): Course Progression Disabled. (Context: view, edit)

45- expire_access (boolean): Course Access Expiration. (Context: view, edit)

46- expire_access_days (integer): Access Period. (Context: view, edit)

47- expire_access_delete_progress (boolean): Data Deletion. (Context: view, edit)