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