Discovery API Documentation

GET /blendxapi/discovery/courses/

Description: Retrieves a list of available courses with support for pagination, search, and filtering.

Endpoint: GET <https://lms_endpoint/blendxapi/discovery/courses/>

Request Parameters:

Parameter Type Required Description
limit integer No Number of records to return per page (default: 8, max: 100).
page integer No Page number (default: 1, 1-indexed).
search string No Search term for course name, description, or overview.
org string No Comma-separated list of organizations to filter by.
tags string No Comma-separated list of tags to filter by.
order_by string No Sort order, e.g., created_at.desc (default).

Response Format:

The response is a JSON object containing the list of courses and pagination metadata.

Field Type Description
courses array List of course objects (see details below).
total_count integer Total number of courses matching the criteria.
has_more boolean Indicates if more pages are available.
limit integer The limit used for the current page.
page integer The current page number.
offset integer The offset calculated from the page number.

Course Object Attributes:

Field Type Description
id string Unique UUID for the course.
openedx_course_id string Open edX course identifier string.
display_name string Course title.
display_image string URL to the course card image.
short_description string Brief course description.
overview string Full HTML description of the course.
price integer Minimum price of the course (0 if free).
start string Course start date (ISO 8601).
end string Course end date (ISO 8601).
effort string Estimated time effort.
enrollment_start string Enrollment start date (ISO 8601).
enrollment_end string Enrollment end date (ISO 8601).
certificate_available_date string Date when certificates become available.
has_any_active_web_certificate boolean Indicates if an active web certificate exists.
link_to_course string Direct URL to the course dashboard.
language string Course language code (e.g., “en”).
self_paced boolean true if self-paced, false if instructor-led.
org string Organization identifier.
number string Course number/code.
course_video_url string/null URL to the course introduction video.
course_mode string The slug of the default (lowest price) mode (e.g., “honor”).
available_course_modes array List of all available modes for this course.
tags array List of tags associated with the course.
is_invite_only boolean Indicates if the course is by invitation only.
is_published boolean Indicates if the course is currently published.

Example Response:

{
  "courses": [
    {
      "id": "267ce96d-1454-4292-aa42-1a0487c7eaaa",
      "openedx_course_id": "course-v1:Fundacion-Santa-Fe-de-Bogota+HOC201+2025_T2",
      "display_name": "Proyecto Warra Jaramia",
      "display_image": "<https://lms.lms_endpoint/asset-v1:ZamsOrg+FOO346+type@asset+block@thumb.jpg>",
      "short_description": "Sabiduría Ancestral en la Atención del Parto...",
      "overview": "<!DOCTYPE html>...",
      "price": 0,
      "start": "2025-02-01T00:00:00Z",
      "end": "2027-02-01T00:30:00Z",
      "effort": "01:00",
      "enrollment_start": "2025-01-01T00:00:00Z",
      "enrollment_end": "2025-03-01T00:00:00Z",
      "certificate_available_date": "2027-02-03T00:30:00Z",
      "has_any_active_web_certificate": false,
      "link_to_course": "<https://apps.lms_endpoint/dashboard/course/course-v1:Fundacion>...",
      "language": "en",
      "self_paced": false,
      "org": "TestOrg",
      "number": "FOO346",
      "course_video_url": null,
      "course_mode": "honor",
      "available_course_modes": [
        {
          "modeSlug": "honor",
          "minPrice": 0,
          "modeDisplayName": "Honor",
          "currency": "usd",
          "visible": true
        }
      ],
      "tags": ["health", "midwifery"],
      "is_invite_only": false,
      "is_published": true
    }
  ],
  "total_count": 1,
  "has_more": false,
  "limit": 8,
  "page": 1,
  "offset": 0
}


POST /search/course_discovery/

Description: Searches for courses based on a given search string.

Endpoint: POST <https://lms_endpoint/search/course_discovery/>

Request Parameters: The request must be sent as application/x-www-form-urlencoded.

Parameter Type Required Description
search_string string No The text to search for in course titles and descriptions.
page_size integer No Number of results per page (default: 20, max: 100).
page_index integer No Zero-based page index (default: 0).

Response Format:

Field Type Description
took integer Time taken for the search (milliseconds).
total integer Total number of matching results.
max_score float Maximum relevance score of results.
results array List of matching course objects.
error string Error message (if any).

Example Request:

curl -X POST <https://lms_endpoint/search/course_discovery/> \\
     -d "search_string=AI" \\
     -d "page_size=10" \\
     -d "page_index=1"

Example Response:

{
    "took": 8,
    "total": 6,
    "max_score": 1,
    "results": [
        {
            "_index": "course_info",
            "_type": "_doc",
            "_id": "course-v1:HealthOnCloud+Test101+2025_T1",
            "_ignored": [
                "content.overview.keyword"
            ],
            "data": {
                "id": "course-v1:HealthOnCloud+Test101+2025_T1",
                "course": "course-v1:HealthOnCloud+Test101+2025_T1",
                "content": {
                    "display_name": "Health on Cloud Test",
                    "overview": " About This Course Include your long course description here... ",
                    "number": "Test101",
                    "short_description": "It is a testing course "
                },
                "image_url": "/static/studio/images/pencils.jpg",
                "start": "2030-01-01T00:00:00+00:00",
                "number": "Test101",
                "org": "HealthOnCloud",
                "modes": ["honor"],
                "language": "ar",
                "invitation_only": true,
                "catalog_visibility": "both"
            },
            "score": 1