Classrooms
Upsert a user from classroom
Upserts a user into the classroom.
PUT
/api/classrooms/{handle}/members
Authorization*
curl --request PUT \
--url https://codecombat.com/api/classrooms/{handle}/members \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"code": "<code>",
"userId": "<userid>"
}'
{
"_id": "string",
"courses": [
{
"_id": "string",
"enrolled": [
"string"
],
"instance_id": "string",
"levels": [
"object"
]
}
],
"description": "string",
"members": [
"string"
],
"name": "string",
"ownerID": "string"
}
Authorizations
Authenticationheaderrequired
string
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
handlerequired
string
The document's _id
or slug
.
Body
application/json
coderequired
string
The code for joining this classroom
retMemberLimit
number | null
limit the return number of members for the classroom, the default value is 1000
userIdrequired
string
The _id
or slug
of the user to add to the class.
Response
200 - application/json
_id
string | null
courses
object[] | null
description
string | null
members
string[] | null
name
string | null
ownerID
string | null
curl --request PUT \
--url https://codecombat.com/api/classrooms/{handle}/members \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"code": "<code>",
"userId": "<userid>"
}'
{
"_id": "string",
"courses": [
{
"_id": "string",
"enrolled": [
"string"
],
"instance_id": "string",
"levels": [
"object"
]
}
],
"description": "string",
"members": [
"string"
],
"name": "string",
"ownerID": "string"
}