{ "opencollection": "1.0.0", "info": { "name": "Open edX agreements enrollment API", "version": "v1" }, "request": { "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "items": [ { "info": { "name": "enrollment", "type": "folder" }, "items": [ { "info": { "name": "Read enrollment information for a particular course.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/course/:course_id", "params": [ { "name": "course_id", "value": "", "type": "path" } ] }, "docs": "HTTP Endpoint for retrieving course level enrollment information." }, { "info": { "name": "Gets a list of all course enrollments for a user.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment" }, "docs": "Returns a list for the currently logged in user, or for the user named by the 'user' GET\nparameter. If the username does not match that of the currently logged in user, only\ncourses for which the currently logged in user has the Staff or Admin role are listed.\nAs a result, a course team member can find out which of their own courses a particular\nlearner is enrolled in.\n\nOnly the Staff or Admin role (granted on the Django administrative console as the staff\nor instructor permission) in individual" }, { "info": { "name": "Enrolls the currently logged-in user in a course.", "type": "http" }, "http": { "method": "POST", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment" }, "docs": "Server-to-server calls may deactivate or modify the mode of existing enrollments. All other requests\ngo through `add_enrollment()`, which allows creation of new and reactivation of old enrollments." }, { "info": { "name": "Create, read, or update enrollment information for a user.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment/:course_id", "params": [ { "name": "course_id", "value": "", "type": "path" } ] }, "docs": "HTTP Endpoint for all CRUD operations for a user course enrollment. Allows creation, reading, and\nupdates of the current enrollment for a particular course." }, { "info": { "name": "Create, read, or update enrollment information for a user.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment/:username,:course_id", "params": [ { "name": "username", "value": "", "type": "path" }, { "name": "course_id", "value": "", "type": "path" } ] }, "docs": "HTTP Endpoint for all CRUD operations for a user course enrollment. Allows creation, reading, and\nupdates of the current enrollment for a particular course." }, { "info": { "name": "Returns the enrollments allowed for a given user email.", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment_allowed/" }, "docs": "**Example Requests**\n\nGET /api/enrollment/v1/enrollment_allowed?email=user@example.com\n\n**Parameters**\n\n- `email` (optional, string, _query_params_) - defaults to the calling user if not provided.\n\n**Responses**\n- 200: Success.\n- 403: Forbidden, you need to be staff." }, { "info": { "name": "Creates an enrollment allowed for a given user email and course id.", "type": "http" }, "http": { "method": "POST", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment_allowed/" }, "docs": "**Example Request**\n\nPOST /api/enrollment/v1/enrollment_allowed/" }, { "info": { "name": "Deletes an enrollment allowed for a given user email and course id.", "type": "http" }, "http": { "method": "DELETE", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollment_allowed/" }, "docs": "**Example Request**\n\nDELETE /api/enrollment/v1/enrollment_allowed/" }, { "info": { "name": "**Use Cases**", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/enrollments/", "params": [ { "name": "cursor", "value": "", "type": "query", "description": "The pagination cursor value." }, { "name": "page_size", "value": "", "type": "query", "description": "Number of results to return per page." } ] }, "docs": "Get a list of all course enrollments, optionally filtered by a course ID or list of usernames.\n\n**Example Requests**\n\n GET /api/enrollment/v1/enrollments\n\n GET /api/enrollment/v1/enrollments?course_id={course_id}\n\n GET /api/enrollment/v1/enrollments?username={username},{username},{username}\n\n GET /api/enrollment/v1/enrollments?course_id={course_id}&username={username}\n\n GET /api/enrollment/v1/enrollments?email={email},{email}\n\n**Query Parameters for GET**\n\n * course_id: Filters" }, { "info": { "name": "enrollment_v1_roles_list", "type": "http" }, "http": { "method": "GET", "url": "https://open.kaznu.kz/api/enrollment/v1/roles/" }, "docs": "Gets a list of all roles for the currently logged-in user, filtered by course_id if supplied" }, { "info": { "name": "enrollment_v1_unenroll_create", "type": "http" }, "http": { "method": "POST", "url": "https://open.kaznu.kz/api/enrollment/v1/unenroll/" }, "docs": "Unenrolls the specified user from all courses." } ] } ], "bundled": true }