Sections API

API for accessing section information.

A Section object looks like:

{
  // The unique identifier for the section.
  "id": 1,

  // The name of the section.
  "name": "Section A",

  // The sis id of the section.
  // Ignored if the calling user does not have permission to manage SIS.
  "sis_section_id": null,

  // The unique identifier for the course the section belongs to
  "course_id": 7,

  // the start date for the section, if applicable
  "start_at": "2012-06-01T00:00:00-06:00",

  // the end date for the section, if applicable
  "end_at": null,

  // The unique identifier of the original course of a cross-listed section
  "nonxlist_course_id": null
}
  

List course sections SectionsController#index

GET /api/v1/courses/:course_id/sections

Returns the list of sections for this course.

Request Parameters:

  • include[]
    optional, "students"

    Associations to include with the group. Note: this is only available if you have permission to view users or grades in the course

  • include[]
    optional, "avatar_url"

    Include the avatar URLs for students returned.

Returns a list of Sections

Create course section SectionsController#create

POST /api/v1/courses/:course_id/sections

Creates a new section for this course.

Request Parameters:

  • course_section[name]
    String

    The name of the section

  • course_section[sis_section_id]
    String, optional

    The sis ID of the section

  • course_section[start_at]
    Datetime, optional

    Section start date in ISO8601 format, e.g. 2011-01-01T01:00Z

  • course_section[end_at]
    Datetime, optional

    Section end date in ISO8601 format. e.g. 2011-01-01T01:00Z

Returns a Section

Cross-list a Section SectionsController#crosslist

POST /api/v1/sections/:id/crosslist/:new_course_id

Move the Section to another course. The new course may be in a different account (department), but must belong to the same root account (institution).

Returns a Section

De-cross-list a Section SectionsController#uncrosslist

DELETE /api/v1/sections/:id/crosslist

Undo cross-listing of a Section, returning it to its original course.

Returns a Section

Edit a section SectionsController#update

PUT /api/v1/sections/:id

Modify an existing section. See the documentation for create API action.

Returns a Section

Get section information SectionsController#show

GET /api/v1/courses/:course_id/sections/:id

GET /api/v1/sections/:id

Gets details about a specific section

Returns a Section

Delete a section SectionsController#destroy

DELETE /api/v1/sections/:id

Delete an existing section. Returns the former Section.

Returns a Section