REST Resource: registrations

Resource: Registration

An instruction to Classroom to send notifications from the feed to the provided destination.

JSON representation
{
  "registrationId": string,
  "feed": {
    object (Feed)
  },
  "expiryTime": string,

  // Union field destination can be only one of the following:
  "cloudPubsubTopic": {
    object (CloudPubsubTopic)
  }
  // End of list of possible types for union field destination.
}
Fields
registrationId

string

A server-generated unique identifier for this Registration.

Read-only.

feed

object (Feed)

Specification for the class of notifications that Classroom should deliver to the destination.

expiryTime

string (Timestamp format)

The time until which the Registration is effective.

This is a read-only field assigned by the server.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field destination. Where notifications should be sent. destination can be only one of the following:
cloudPubsubTopic

object (CloudPubsubTopic)

The Cloud Pub/Sub topic that notifications are to be sent to.

Feed

A class of notifications that an application can register to receive. For example: "all roster changes for a domain".

JSON representation
{
  "feedType": enum (FeedType),

  // Union field info can be only one of the following:
  "courseRosterChangesInfo": {
    object (CourseRosterChangesInfo)
  },
  "courseWorkChangesInfo": {
    object (CourseWorkChangesInfo)
  }
  // End of list of possible types for union field info.
}
Fields
feedType

enum (FeedType)

The type of feed.

Union field info. Additional parameters about the feed. info can be only one of the following:
courseRosterChangesInfo

object (CourseRosterChangesInfo)

Information about a Feed with a feedType of COURSE_ROSTER_CHANGES. This field must be specified if feedType is COURSE_ROSTER_CHANGES.

courseWorkChangesInfo

object (CourseWorkChangesInfo)

Information about a Feed with a feedType of COURSE_WORK_CHANGES. This field must be specified if feedType is COURSE_WORK_CHANGES.

FeedType

A type of feed that an application can register for notifications from.

Enums
FEED_TYPE_UNSPECIFIED Should never be returned or provided.
DOMAIN_ROSTER_CHANGES

All roster changes for a particular domain.

Notifications will be generated whenever a user joins or leaves a course.

No notifications will be generated when an invitation is created or deleted, but notifications will be generated when a user joins a course by accepting an invitation.

COURSE_ROSTER_CHANGES

All roster changes for a particular course.

Notifications will be generated whenever a user joins or leaves a course.

No notifications will be generated when an invitation is created or deleted, but notifications will be generated when a user joins a course by accepting an invitation.

COURSE_WORK_CHANGES

All course work activity for a particular course.

Notifications will be generated when a CourseWork or StudentSubmission object is created or modified. No notification will be generated when a StudentSubmission object is created in connection with the creation or modification of its parent CourseWork object (but a notification will be generated for that CourseWork object's creation or modification).

CourseRosterChangesInfo

Information about a Feed with a feedType of COURSE_ROSTER_CHANGES.

JSON representation
{
  "courseId": string
}
Fields
courseId

string

The courseId of the course to subscribe to roster changes for.

CourseWorkChangesInfo

Information about a Feed with a feedType of COURSE_WORK_CHANGES.

JSON representation
{
  "courseId": string
}
Fields
courseId

string

The courseId of the course to subscribe to work changes for.

CloudPubsubTopic

A reference to a Cloud Pub/Sub topic.

To register for notifications, the owner of the topic must grant classroom-notifications@system.gserviceaccount.com the projects.topics.publish permission.

JSON representation
{
  "topicName": string
}
Fields
topicName

string

The name field of a Cloud Pub/Sub Topic.

Methods

create

Creates a Registration, causing Classroom to start sending notifications from the provided feed to the destination provided in cloudPubSubTopic.

delete

Deletes a Registration, causing Classroom to stop sending notifications for that Registration.