Appointment Groups
API for creating, accessing and updating appointment groups. Appointment groups provide a way of creating a bundle of time slots that users can sign up for (e.g. "Office Hours" or "Meet with professor about Final Project"). Both time slots and reservations of time slots are stored as Calendar Events.
An Appointment object looks like:
An AppointmentGroup object looks like:
AppointmentGroupsController#index
GET /api/v1/appointment_groups
GET /api/v1/appointment_groups
Scope: url:GET|/api/v1/appointment_groups
Retrieve the paginated list of appointment groups that can be reserved or managed by the current user.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Defaults to “reservable” Allowed values: |
|
| Array of context codes used to limit returned results. |
|
| Defaults to false. If true, includes past appointment groups |
|
| Array of additional information to include.
Allowed values: |
AppointmentGroupsController#create
POST /api/v1/appointment_groups
POST /api/v1/appointment_groups
Scope: url:POST|/api/v1/appointment_groups
Create and return a new appointment group. If new_appointments are specified, the response will return a new_appointments array (same format as appointments array, see “List appointment groups” action)
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | Array of context codes (courses, e.g. course_1) this group should be linked to (1 or more). Users in the course(s) with appropriate permissions will be able to sign up for this appointment group. |
|
| Array of sub context codes (course sections or a single group category) this group should be linked to. Used to limit the appointment group to particular sections. If a group category is specified, students will sign up in groups and the participant_type will be “Group” instead of “User”. |
| Required | Short title for the appointment group. |
|
| Longer text description of the appointment group. |
|
| Location name of the appointment group. |
|
| Location address. |
|
| Indicates whether this appointment group should be published (i.e. made available for signup). Once published, an appointment group cannot be unpublished. Defaults to false. |
|
| Maximum number of participants that may register for each time slot. Defaults to null (no limit). |
|
| Minimum number of time slots a user must register for. If not set, users do not need to sign up for any time slots. |
|
| Maximum number of time slots a user may register for. |
|
| Nested array of start time/end time pairs indicating time slots for this appointment group. Refer to the example request. |
|
|
Allowed values: |
|
| Whether observer users can sign-up for an appointment. Defaults to false. |
Example Request:
AppointmentGroupsController#show
GET /api/v1/appointment_groups/:id
GET /api/v1/appointment_groups/:id
Scope: url:GET|/api/v1/appointment_groups/:id
Returns information for a single appointment group
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Array of additional information to include. See include[] argument of “List appointment groups” action.
Allowed values: |
AppointmentGroupsController#update
PUT /api/v1/appointment_groups/:id
PUT /api/v1/appointment_groups/:id
Scope: url:PUT|/api/v1/appointment_groups/:id
Update and return an appointment group. If new_appointments are specified, the response will return a new_appointments array (same format as appointments array, see “List appointment groups” action).
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | Array of context codes (courses, e.g. course_1) this group should be linked to (1 or more). Users in the course(s) with appropriate permissions will be able to sign up for this appointment group. |
|
| Array of sub context codes (course sections or a single group category) this group should be linked to. Used to limit the appointment group to particular sections. If a group category is specified, students will sign up in groups and the participant_type will be “Group” instead of “User”. |
|
| Short title for the appointment group. |
|
| Longer text description of the appointment group. |
|
| Location name of the appointment group. |
|
| Location address. |
|
| Indicates whether this appointment group should be published (i.e. made available for signup). Once published, an appointment group cannot be unpublished. Defaults to false. |
|
| Maximum number of participants that may register for each time slot. Defaults to null (no limit). |
|
| Minimum number of time slots a user must register for. If not set, users do not need to sign up for any time slots. |
|
| Maximum number of time slots a user may register for. |
|
| Nested array of start time/end time pairs indicating time slots for this appointment group. Refer to the example request. |
|
|
Allowed values: |
|
| Whether observer users can sign-up for an appointment. |
Example Request:
AppointmentGroupsController#destroy
DELETE /api/v1/appointment_groups/:id
DELETE /api/v1/appointment_groups/:id
Scope: url:DELETE|/api/v1/appointment_groups/:id
Delete an appointment group (and associated time slots and reservations) and return the deleted group
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Reason for deleting/canceling the appointment group. |
Example Request:
AppointmentGroupsController#users
GET /api/v1/appointment_groups/:id/users
GET /api/v1/appointment_groups/:id/users
Scope: url:GET|/api/v1/appointment_groups/:id/users
A paginated list of users that are (or may be) participating in this appointment group. Refer to the Users API for the response fields. Returns no results for appointment groups with the “Group” participant_type.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Limits results to the a given participation status, defaults to “all” Allowed values: |
AppointmentGroupsController#groups
GET /api/v1/appointment_groups/:id/groups
GET /api/v1/appointment_groups/:id/groups
Scope: url:GET|/api/v1/appointment_groups/:id/groups
A paginated list of student groups that are (or may be) participating in this appointment group. Refer to the Groups API for the response fields. Returns no results for appointment groups with the “User” participant_type.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Limits results to the a given participation status, defaults to “all” Allowed values: |
AppointmentGroupsController#next_appointment
GET /api/v1/appointment_groups/next_appointment
GET /api/v1/appointment_groups/next_appointment
Scope: url:GET|/api/v1/appointment_groups/next_appointment
Return the next appointment available to sign up for. The appointment is returned in a one-element array. If no future appointments are available, an empty array is returned.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| List of ids of appointment groups to search. |
Returns a list of CalendarEvent objects.
© Instructure, Inc. Generated on Wed Nov 6 14:20:05 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated