Classroom
Classroom has 10 operations in gum's generated catalog. Start with search when you know the task, use describe to inspect request fields and scopes, then dispatch through the command that matches the operation risk class.
| Count | Value |
|---|---|
| Family | People and education |
| Operations | 10 |
| Risk classes | 1 destructive, 6 read, 3 write |
| Auth strategies | 10 byo_oauth |
Start here
gum search "classroom"
gum describe classroom.courses.announcements.list
gum read classroom.courses.announcements.list --args '{"courseId":"<courseId>"}' --output jsonFor write-class operations, gum requires the write command and an explicit write gate:
gum describe classroom.courses.courseWork.create
gum write classroom.courses.courseWork.create --allow-write --args '{"courseId":"<courseId>"}'For destructive operations, run the call once for a confirmation envelope, review the target, then retry with the returned token:
gum destructive classroom.courses.delete --args '{"id":"<id>"}'
gum destructive classroom.courses.delete --args '{"id":"<id>"}' --confirmed --token '<confirmation_token>'Auth
Auth strategies in this service: 10 byo_oauth. Authenticate the strategy used by the operation you plan to call.
Bring-your-own OAuth
- In Google Cloud, enable Google Classroom API.
- Configure the OAuth consent screen. Add your Google account as a test user when the app is still in testing mode.
- Create an OAuth client ID with application type
Desktop app. - Add the scopes this service needs to the consent screen.
- Store the client in gum:
printf '%s' "$GOOGLE_OAUTH_CLIENT_SECRET" \
| gum auth use-oauth-client --client-id "$GOOGLE_OAUTH_CLIENT_ID" --secret-stdin- Authorize this service:
gum login --service classroom- Verify the grant before dispatch:
gum auth status --scopes classroom.announcements.readonly,classroom.courses,classroom.courses.readonly,classroom.coursework.students,classroom.coursework.students.readonly,classroom.rosters.readonly
gum describe classroom.courses.announcements.listScopes used by these operations:
https://www.googleapis.com/auth/classroom.announcements.readonlyhttps://www.googleapis.com/auth/classroom.courseshttps://www.googleapis.com/auth/classroom.courses.readonlyhttps://www.googleapis.com/auth/classroom.coursework.studentshttps://www.googleapis.com/auth/classroom.coursework.students.readonlyhttps://www.googleapis.com/auth/classroom.rosters.readonly
Service setup notes: Classroom auth guide.
Operations
| Operation | Risk | Auth | Summary |
|---|---|---|---|
classroom.courses.announcements.list |
read |
byo_oauth |
List the announcements posted to a course stream. |
classroom.courses.courseWork.create |
write |
byo_oauth |
Create a coursework item (assignment) in a course (args.body: title, workType, …). |
classroom.courses.courseWork.get |
read |
byo_oauth |
Fetch a single coursework item by id. |
classroom.courses.courseWork.list |
read |
byo_oauth |
List the coursework (assignments) in a course. |
classroom.courses.create |
write |
byo_oauth |
Create a new course (args.body: name, ownerId, section). |
classroom.courses.delete |
destructive |
byo_oauth |
Delete a course by id. Destructive — requires confirmation per §6.1. |
classroom.courses.get |
read |
byo_oauth |
Fetch a course by id. |
classroom.courses.list |
read |
byo_oauth |
List courses the caller can access (filter by studentId/teacherId/courseStates). |
classroom.courses.students.list |
read |
byo_oauth |
List the students enrolled in a course. |
classroom.courses.update |
write |
byo_oauth |
Replace a course by id (args.body). |
Next
- Use API workflows for search, describe, invoke, and error handling.
- Use Auth guides for service-specific Google setup.
- Use Command index for CLI flags and generated help.
