{ "opencollection": "1.0.0", "info": { "name": "Open edX agreements notifications API", "version": "v1" }, "request": { "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "items": [ { "info": { "name": "notifications", "type": "folder" }, "items": [ { "info": { "name": "API view for listing notifications for a user.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/notifications/", "params": [ { "name": "page", "value": "", "type": "query", "description": "A page number within the paginated result set." }, { "name": "page_size", "value": "", "type": "query", "description": "Number of results to return per page." } ] }, "docs": "**Permissions**: User must be authenticated.\n**Response Format** (paginated):\n\n {\n \"results\" : [\n {\n \"id\": (int) notification_id,\n \"app_name\": (str) app_name,\n \"notification_type\": (str) notification_type,\n \"content\": (str) content,\n \"content_context\": (dict) content_context,\n \"content_url\": (str) content_url,\n \"last_read\": (datetime) last_read,\n \"last_seen" }, { "info": { "name": "notifications_configurations_list", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/notifications/configurations/" }, "docs": "API view for getting the aggregate notification preferences for the current user." }, { "info": { "name": "Returns notification preference for user for a course.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/notifications/configurations/:course_key_string", "params": [ { "name": "course_key_string", "value": "", "type": "path" } ] }, "docs": "Parameters:\n request (Request): The request object.\n course_key_string (int): The ID of the course to retrieve notification preference.\n\n Returns:\n {\n 'id': 1,\n 'course_name': 'testcourse',\n 'course_id': 'course-v1:testorg+testcourse+testrun',\n 'notification_preference_config': {\n 'discussion': {\n 'enabled': False,\n 'core': {\n 'info': '',\n 'web': False,\n 'push" }, { "info": { "name": "notifications_configurations_partial_update", "type": "http" }, "http": { "method": "PATCH", "url": "https://open.kaznu.kz/api/notifications/configurations/:course_key_string", "params": [ { "name": "course_key_string", "value": "", "type": "path" } ] }, "docs": "Update an existing user notification preference with the data in the request body." }, { "info": { "name": "Get the unseen notifications count and show_notification_tray flag for a user.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/notifications/count/" }, "docs": "**Permissions**: User must be authenticated.\n**Response Format**:\n```json\n{\n \"show_notifications_tray\": (bool) show_notifications_tray,\n \"count\": (int) total_number_of_unseen_notifications,\n \"count_by_app_name\": {\n (str) app_name: (int) number_of_unseen_notifications,\n ...\n },\n \"notification_expiry_days\": 60\n}\n```\n**Response Error Codes**:\n- 403: The requester cannot access resource." }, { "info": { "name": "API endpoint to get active CourseEnrollments for requester.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/notifications/enrollments/", "params": [ { "name": "page", "value": "", "type": "query", "description": "A page number within the paginated result set." }, { "name": "page_size", "value": "", "type": "query", "description": "Number of results to return per page." } ] }, "docs": "**Permissions**: User must be authenticated.\n**Response Format** (paginated):\n\n {\n \"next\": (str) url_to_next_page_of_courses,\n \"previous\": (str) url_to_previous_page_of_courses,\n \"count\": (int) total_number_of_courses,\n \"num_pages\": (int) total_number_of_pages,\n \"current_page\": (int) current_page_number,\n \"start\": (int) index_of_first_course_on_page,\n \"results\" : [\n {\n \"course\": {\n \"id\": (int) course" }, { "info": { "name": "notifications_mark-seen_update", "type": "http" }, "http": { "method": "PUT", "url": "https://open.kaznu.kz/api/notifications/mark-seen/:app_name/", "params": [ { "name": "app_name", "value": "", "type": "path" } ] }, "docs": "API view for marking user's all notifications seen for a provided app_name." }, { "info": { "name": "notifications_mark-seen_partial_update", "type": "http" }, "http": { "method": "PATCH", "url": "https://open.kaznu.kz/api/notifications/mark-seen/:app_name/", "params": [ { "name": "app_name", "value": "", "type": "path" } ] }, "docs": "API view for marking user's all notifications seen for a provided app_name." }, { "info": { "name": "notifications_preferences_update-all_create", "type": "http" }, "http": { "method": "POST", "url": "https://open.kaznu.kz/api/notifications/preferences/update-all/" }, "docs": "Update all notification preferences for the current user." }, { "info": { "name": "notifications_preferences_update_read", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/notifications/preferences/update/:username/:patch/", "params": [ { "name": "username", "value": "", "type": "path" }, { "name": "patch", "value": "", "type": "path" } ] }, "docs": "View to update user preferences from encrypted username and patch.\nusername and patch must be string" }, { "info": { "name": "notifications_preferences_update_create", "type": "http" }, "http": { "method": "POST", "url": "https://open.kaznu.kz/api/notifications/preferences/update/:username/:patch/", "params": [ { "name": "username", "value": "", "type": "path" }, { "name": "patch", "value": "", "type": "path" } ] }, "docs": "View to update user preferences from encrypted username and patch.\nusername and patch must be string" }, { "info": { "name": "notifications_read_partial_update", "type": "http" }, "http": { "method": "PATCH", "url": "https://open.kaznu.kz/api/notifications/read/" }, "docs": "Marks all notifications or single notification read for the given\napp name or notification id for the authenticated user." } ] } ], "bundled": true }