# catalog_enrollment_courses_search_retrieve API View for searching course enrollments. This endpoint allows searching for course enrollments based on various filters such as user ID, username, email, course ID, slug, organization, and platform key. Results are paginated and include detailed enrollment information. Query Parameters: user_id (str, optional): Filter enrollments by user ID username (str, optional): Filter enrollments by username email (str, optional): Filter enrollments by user email course_id (str, optional): Filter enrollments by course ID slug (str, optional): Filter enrollments by course slug org (str, optional): Filter enrollments by organization platform_key (str, optional): Filter enrollments by platform key course_name (str, optional): Filter enrollments by course name (partial match) include_default_platform (bool, optional): Include enrollments from default platform sort (str, optional): Field to sort results by (default: '-id') page (int, optional): Page number for pagination page_size (int, optional): Number of items per page Methods: GET: Search for course enrollments with filtering and pagination Returns: GET: A paginated JSON response containing course enrollments: { "count": 42, "next": "https://api.example.com/api/catalog/enrollment/courses/search/?page=2", "previous": null, "results": [ { "user_id": 123, "username": "student1", "email": "student1@example.com", "course_id": "course-v1:org+course+run", "active": true, "created": "2023-01-15T10:30:00Z", "started": "2023-01-15T10:30:00Z", "ended": null, "expired": null, "metadata": {}, "name": "John Doe", "course_name": "Introduction to Data Science" }, ... ] } Error Responses: 400 Bad Request: If required parameters are missing or if enrollment search fails 401 Unauthorized: If the user is not authenticated 403 Forbidden: If the user does not have permission to access this resource 500 Internal Server Error: If an unexpected error occurs Access Control: - Requires IsDMAdmin, IsEdxUserReadOnly, or IsPlatformAdminOfUserReadOnly permission - Users can view their own enrollments - Platform admins can view enrollments for users in their platform - DM admins can view all enrollments Endpoint: GET /api/catalog/enrollment/courses/search/ Version: 3.59.0-ai-plus Security: PlatformApiKeyAuthentication ## Query parameters: - `course_id` (string) Filter enrollments by course ID - `course_name` (string) Filter enrollments by course name (partial match) - `email` (string) Filter enrollments by user email - `include_default_platform` (boolean) Include enrollments from default platform - `org` (string) Filter enrollments by organization - `page` (integer) Page number for pagination - `page_size` (integer) Number of items per page - `platform_key` (string) Filter enrollments by platform key - `slug` (string) Filter enrollments by course slug - `sort` (string) Field to sort results by - `user_id` (string) Filter enrollments by user ID - `username` (string) Filter enrollments by username ## Response 200 fields (application/json): - `user_id` (integer, required) User ID associated with the enrollment - `username` (string, required) Username associated with the enrollment - `email` (string, required) Email of the user - `course_id` (string, required) Course ID associated with the enrollment - `active` (boolean, required) Whether the enrollment is active - `created` (string, required) Date when enrollment began/activated - `started` (string,null, required) Date when enrollment started - `ended` (string,null, required) Date when enrollment ended/deactivated - `expired` (string,null, required) Date when enrollment expires - `metadata` (any,null, required) Enrollment specific metadata - `name` (string,null, required) Full name of the user - `course_name` (string, required) Name of the course