Best Answer

Using the API Explorer -- GET Courses API with the extra filters

  • 4 February 2022
  • 1 reply
  • 501 views

Userlevel 1

Can anyone offer a suggestion on what the body should like when you are using the API Explorer to call  GET/course/v1/courses

and you want to use the extra_filters to filter and only return a specific “code”?

The sample shows this, but I can’t figure out how to format what goes in the box.

 

Additional optional filters to be applied over the returned result. Example: {"enrollments": {"criteria": enum("more_than", "less_than", "equal_to"), "value": integer}, "waiting_users": {"criteria": enum("more_than", "lass_than", "equal_to"), "value": integer}, "session_waiting_users": {"criteria": enum("more_than", "less_than", "equal_to"), "value": integer}, "for_sale": {"criteria": enum("equal_to"), "value": boolean}, "imported_from_content_marketplace": {"criteria": enum("equal_to"), "value": boolean}, "course_expiring": {"criteria": enum("equal_to"), "value": boolean}, "course_expired": {"criteria": enum("equal_to"), "value": boolean}, "code": {"criteria": enum("equal_to", "contains"), "value": string}, "has_esignature_enabled": {"criteria": enum("equal_to"), "value": boolean}, "category": {"criteria": "in_array", "value": [{"id": integer, "include_descendants": boolean}]}, "outdated": {"criteria": enum("more_than"), "value": integer}, "certificate": {"criteria": enum("equal_to"), "value": boolean}}

icon

Best answer by lanelackas 25 March 2022, 21:38

View original

1 reply

If you are using the web-based API Explorer, then the following two examples are valid entries in the extra_filters box:

 

{"code" : {"criteria" : "contains", "value" : "Demo" }}

{"code" : {"criteria" : "equal_to", "value" : "Articulate" }}

 

Reply