1 <html><body> 2 <style> 3 4 body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13 } 14 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51 } 52 53 .toc_element { 54 margin-top: 0.5em; 55 } 56 57 .firstline { 58 margin-left: 2 em; 59 } 60 61 .method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66 } 67 68 .details { 69 font-weight: bold; 70 font-size: 14px; 71 } 72 73 </style> 74 75 <h1><a href="classroom_v1.html">Google Classroom API</a> . <a href="classroom_v1.courses.html">courses</a> . <a href="classroom_v1.courses.students.html">students</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#create">create(courseId, body, enrollmentCode=None, x__xgafv=None)</a></code></p> 79 <p class="firstline">Adds a user as a student of a course.</p> 80 <p class="toc_element"> 81 <code><a href="#delete">delete(courseId, userId, x__xgafv=None)</a></code></p> 82 <p class="firstline">Deletes a student of a course.</p> 83 <p class="toc_element"> 84 <code><a href="#get">get(courseId, userId, x__xgafv=None)</a></code></p> 85 <p class="firstline">Returns a student of a course.</p> 86 <p class="toc_element"> 87 <code><a href="#list">list(courseId, pageSize=None, x__xgafv=None, pageToken=None)</a></code></p> 88 <p class="firstline">Returns a list of students of this course that the requester</p> 89 <p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91 <p class="firstline">Retrieves the next page of results.</p> 92 <h3>Method Details</h3> 93 <div class="method"> 94 <code class="details" id="create">create(courseId, body, enrollmentCode=None, x__xgafv=None)</code> 95 <pre>Adds a user as a student of a course. 96 97 This method returns the following error codes: 98 99 * `PERMISSION_DENIED` if the requesting user is not permitted to create 100 students in this course or for access errors. 101 * `NOT_FOUND` if the requested course ID does not exist. 102 * `FAILED_PRECONDITION` if the requested user's account is disabled, 103 for the following request errors: 104 * CourseMemberLimitReached 105 * CourseNotModifiable 106 * UserGroupsMembershipLimitReached 107 * `ALREADY_EXISTS` if the user is already a student or teacher in the 108 course. 109 110 Args: 111 courseId: string, Identifier of the course to create the student in. 112 This identifier can be either the Classroom-assigned identifier or an 113 alias. (required) 114 body: object, The request body. (required) 115 The object takes the form of: 116 117 { # Student in a course. 118 "courseId": "A String", # Identifier of the course. 119 # 120 # Read-only. 121 "profile": { # Global information for a user. # Global user information for the student. 122 # 123 # Read-only. 124 "permissions": [ # Global permissions of the user. 125 # 126 # Read-only. 127 { # Global user permission description. 128 "permission": "A String", # Permission value. 129 }, 130 ], 131 "emailAddress": "A String", # Email address of the user. 132 # 133 # Read-only. 134 "id": "A String", # Identifier of the user. 135 # 136 # Read-only. 137 "name": { # Details of the user's name. # Name of the user. 138 # 139 # Read-only. 140 "fullName": "A String", # The user's full name formed by concatenating the first and last name 141 # values. 142 # 143 # Read-only. 144 "givenName": "A String", # The user's first name. 145 # 146 # Read-only. 147 "familyName": "A String", # The user's last name. 148 # 149 # Read-only. 150 }, 151 "photoUrl": "A String", # URL of user's profile photo. 152 # 153 # Read-only. 154 }, 155 "studentWorkFolder": { # Representation of a Google Drive folder. # Information about a Drive Folder for this student's work in this course. 156 # Only visible to the student and domain administrators. 157 # 158 # Read-only. 159 "alternateLink": "A String", # URL that can be used to access the Drive folder. 160 # 161 # Read-only. 162 "id": "A String", # Drive API resource ID. 163 "title": "A String", # Title of the Drive folder. 164 # 165 # Read-only. 166 }, 167 "userId": "A String", # Identifier of the user. 168 # 169 # When specified as a parameter of a request, this identifier can be one of 170 # the following: 171 # 172 # * the numeric identifier for the user 173 # * the email address of the user 174 # * the string literal `"me"`, indicating the requesting user 175 } 176 177 enrollmentCode: string, Enrollment code of the course to create the student in. 178 This code is required if userId 179 corresponds to the requesting user; it may be omitted if the requesting 180 user has administrative permissions to create students for any user. 181 x__xgafv: string, V1 error format. 182 Allowed values 183 1 - v1 error format 184 2 - v2 error format 185 186 Returns: 187 An object of the form: 188 189 { # Student in a course. 190 "courseId": "A String", # Identifier of the course. 191 # 192 # Read-only. 193 "profile": { # Global information for a user. # Global user information for the student. 194 # 195 # Read-only. 196 "permissions": [ # Global permissions of the user. 197 # 198 # Read-only. 199 { # Global user permission description. 200 "permission": "A String", # Permission value. 201 }, 202 ], 203 "emailAddress": "A String", # Email address of the user. 204 # 205 # Read-only. 206 "id": "A String", # Identifier of the user. 207 # 208 # Read-only. 209 "name": { # Details of the user's name. # Name of the user. 210 # 211 # Read-only. 212 "fullName": "A String", # The user's full name formed by concatenating the first and last name 213 # values. 214 # 215 # Read-only. 216 "givenName": "A String", # The user's first name. 217 # 218 # Read-only. 219 "familyName": "A String", # The user's last name. 220 # 221 # Read-only. 222 }, 223 "photoUrl": "A String", # URL of user's profile photo. 224 # 225 # Read-only. 226 }, 227 "studentWorkFolder": { # Representation of a Google Drive folder. # Information about a Drive Folder for this student's work in this course. 228 # Only visible to the student and domain administrators. 229 # 230 # Read-only. 231 "alternateLink": "A String", # URL that can be used to access the Drive folder. 232 # 233 # Read-only. 234 "id": "A String", # Drive API resource ID. 235 "title": "A String", # Title of the Drive folder. 236 # 237 # Read-only. 238 }, 239 "userId": "A String", # Identifier of the user. 240 # 241 # When specified as a parameter of a request, this identifier can be one of 242 # the following: 243 # 244 # * the numeric identifier for the user 245 # * the email address of the user 246 # * the string literal `"me"`, indicating the requesting user 247 }</pre> 248 </div> 249 250 <div class="method"> 251 <code class="details" id="delete">delete(courseId, userId, x__xgafv=None)</code> 252 <pre>Deletes a student of a course. 253 254 This method returns the following error codes: 255 256 * `PERMISSION_DENIED` if the requesting user is not permitted to delete 257 students of this course or for access errors. 258 * `NOT_FOUND` if no student of this course has the requested ID or if the 259 course does not exist. 260 261 Args: 262 courseId: string, Identifier of the course. 263 This identifier can be either the Classroom-assigned identifier or an 264 alias. (required) 265 userId: string, Identifier of the student to delete. The identifier can be one of the 266 following: 267 268 * the numeric identifier for the user 269 * the email address of the user 270 * the string literal `"me"`, indicating the requesting user (required) 271 x__xgafv: string, V1 error format. 272 Allowed values 273 1 - v1 error format 274 2 - v2 error format 275 276 Returns: 277 An object of the form: 278 279 { # A generic empty message that you can re-use to avoid defining duplicated 280 # empty messages in your APIs. A typical example is to use it as the request 281 # or the response type of an API method. For instance: 282 # 283 # service Foo { 284 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 285 # } 286 # 287 # The JSON representation for `Empty` is empty JSON object `{}`. 288 }</pre> 289 </div> 290 291 <div class="method"> 292 <code class="details" id="get">get(courseId, userId, x__xgafv=None)</code> 293 <pre>Returns a student of a course. 294 295 This method returns the following error codes: 296 297 * `PERMISSION_DENIED` if the requesting user is not permitted to view 298 students of this course or for access errors. 299 * `NOT_FOUND` if no student of this course has the requested ID or if the 300 course does not exist. 301 302 Args: 303 courseId: string, Identifier of the course. 304 This identifier can be either the Classroom-assigned identifier or an 305 alias. (required) 306 userId: string, Identifier of the student to return. The identifier can be one of the 307 following: 308 309 * the numeric identifier for the user 310 * the email address of the user 311 * the string literal `"me"`, indicating the requesting user (required) 312 x__xgafv: string, V1 error format. 313 Allowed values 314 1 - v1 error format 315 2 - v2 error format 316 317 Returns: 318 An object of the form: 319 320 { # Student in a course. 321 "courseId": "A String", # Identifier of the course. 322 # 323 # Read-only. 324 "profile": { # Global information for a user. # Global user information for the student. 325 # 326 # Read-only. 327 "permissions": [ # Global permissions of the user. 328 # 329 # Read-only. 330 { # Global user permission description. 331 "permission": "A String", # Permission value. 332 }, 333 ], 334 "emailAddress": "A String", # Email address of the user. 335 # 336 # Read-only. 337 "id": "A String", # Identifier of the user. 338 # 339 # Read-only. 340 "name": { # Details of the user's name. # Name of the user. 341 # 342 # Read-only. 343 "fullName": "A String", # The user's full name formed by concatenating the first and last name 344 # values. 345 # 346 # Read-only. 347 "givenName": "A String", # The user's first name. 348 # 349 # Read-only. 350 "familyName": "A String", # The user's last name. 351 # 352 # Read-only. 353 }, 354 "photoUrl": "A String", # URL of user's profile photo. 355 # 356 # Read-only. 357 }, 358 "studentWorkFolder": { # Representation of a Google Drive folder. # Information about a Drive Folder for this student's work in this course. 359 # Only visible to the student and domain administrators. 360 # 361 # Read-only. 362 "alternateLink": "A String", # URL that can be used to access the Drive folder. 363 # 364 # Read-only. 365 "id": "A String", # Drive API resource ID. 366 "title": "A String", # Title of the Drive folder. 367 # 368 # Read-only. 369 }, 370 "userId": "A String", # Identifier of the user. 371 # 372 # When specified as a parameter of a request, this identifier can be one of 373 # the following: 374 # 375 # * the numeric identifier for the user 376 # * the email address of the user 377 # * the string literal `"me"`, indicating the requesting user 378 }</pre> 379 </div> 380 381 <div class="method"> 382 <code class="details" id="list">list(courseId, pageSize=None, x__xgafv=None, pageToken=None)</code> 383 <pre>Returns a list of students of this course that the requester 384 is permitted to view. 385 386 This method returns the following error codes: 387 388 * `NOT_FOUND` if the course does not exist. 389 * `PERMISSION_DENIED` for access errors. 390 391 Args: 392 courseId: string, Identifier of the course. 393 This identifier can be either the Classroom-assigned identifier or an 394 alias. (required) 395 pageSize: integer, Maximum number of items to return. Zero means no maximum. 396 397 The server may return fewer than the specified number of results. 398 x__xgafv: string, V1 error format. 399 Allowed values 400 1 - v1 error format 401 2 - v2 error format 402 pageToken: string, nextPageToken 403 value returned from a previous 404 list call, indicating that 405 the subsequent page of results should be returned. 406 407 The list request must be 408 otherwise identical to the one that resulted in this token. 409 410 Returns: 411 An object of the form: 412 413 { # Response when listing students. 414 "students": [ # Students who match the list request. 415 { # Student in a course. 416 "courseId": "A String", # Identifier of the course. 417 # 418 # Read-only. 419 "profile": { # Global information for a user. # Global user information for the student. 420 # 421 # Read-only. 422 "permissions": [ # Global permissions of the user. 423 # 424 # Read-only. 425 { # Global user permission description. 426 "permission": "A String", # Permission value. 427 }, 428 ], 429 "emailAddress": "A String", # Email address of the user. 430 # 431 # Read-only. 432 "id": "A String", # Identifier of the user. 433 # 434 # Read-only. 435 "name": { # Details of the user's name. # Name of the user. 436 # 437 # Read-only. 438 "fullName": "A String", # The user's full name formed by concatenating the first and last name 439 # values. 440 # 441 # Read-only. 442 "givenName": "A String", # The user's first name. 443 # 444 # Read-only. 445 "familyName": "A String", # The user's last name. 446 # 447 # Read-only. 448 }, 449 "photoUrl": "A String", # URL of user's profile photo. 450 # 451 # Read-only. 452 }, 453 "studentWorkFolder": { # Representation of a Google Drive folder. # Information about a Drive Folder for this student's work in this course. 454 # Only visible to the student and domain administrators. 455 # 456 # Read-only. 457 "alternateLink": "A String", # URL that can be used to access the Drive folder. 458 # 459 # Read-only. 460 "id": "A String", # Drive API resource ID. 461 "title": "A String", # Title of the Drive folder. 462 # 463 # Read-only. 464 }, 465 "userId": "A String", # Identifier of the user. 466 # 467 # When specified as a parameter of a request, this identifier can be one of 468 # the following: 469 # 470 # * the numeric identifier for the user 471 # * the email address of the user 472 # * the string literal `"me"`, indicating the requesting user 473 }, 474 ], 475 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further 476 # results are available. 477 }</pre> 478 </div> 479 480 <div class="method"> 481 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 482 <pre>Retrieves the next page of results. 483 484 Args: 485 previous_request: The request for the previous page. (required) 486 previous_response: The response from the request for the previous page. (required) 487 488 Returns: 489 A request object that you can call 'execute()' on to request the next 490 page. Returns None if there are no more items in the collection. 491 </pre> 492 </div> 493 494 </body></html>