PostmanOpenAPIContact usSign up
  • Overview
    • Introduction
  • API Reference
    • POSTAdd Oauth2 Identity
LogoLogo
PostmanOpenAPIContact usSign up
API ReferenceClassrooms

PUT
https://codecombat.com/api/classrooms/:classroomHandle/courses/:courseHandle/enrolled
PUT
/api/classrooms/:classroomHandle/courses/:courseHandle/enrolled
1import requests
2
3url = "https://codecombat.com/api/classrooms/%3AclassroomHandle/courses/%3AcourseHandle/enrolled"
4
5querystring = {"retMemberLimit":"1"}
6
7payload = { "userId": "string" }
8headers = {
9 "Authorization": "Basic <username>:<password>",
10 "Content-Type": "application/json"
11}
12
13response = requests.put(url, json=payload, headers=headers, params=querystring)
14
15print(response.json())
Try it
200Updated
1{
2 "_id": "string",
3 "name": "string",
4 "members": [
5 "string"
6 ],
7 "ownerID": "string",
8 "description": "string",
9 "courses": [
10 {
11 "_id": "string",
12 "levels": [
13 {
14 "string": {}
15 }
16 ],
17 "enrolled": [
18 "string"
19 ],
20 "instance_id": "string"
21 }
22 ]
23}
Was this page helpful?
Previous

Remove User from a classroom

Next
Built with
Enrolls a user in a course in a classroom. If the course is paid, user must have an active license. User must be a member of the classroom.
Enroll User in a Course

Authentication

AuthorizationBasic
Basic authentication of the form `Basic <username:password>`.

Path Parameters

classroomHandlestringRequired
The classroom's `_id`.
courseHandlestringRequired
The course's `_id`.

Query Parameters

retMemberLimitdoubleOptional
limit the return number of members for the classroom, the default value is 1000

Request

This endpoint expects an object.
userIdstringRequired

Response

This endpoint returns an object.
_idstring or null
namestring or null
memberslist of strings or null
ownerIDstring or null
descriptionstring or null
courseslist of objects or null
limit the return number of members for the classroom, the default value is 1000

The classroom’s _id.

Basic authentication of the form Basic <username:password>.

The course’s _id.