All pages
Powered by GitBook
1 of 1

Loading...

Blackout Dates

API for accessing blackout date information.

A BlackoutDate object looks like:

// Blackout dates are used to prevent scheduling assignments on a given date in
// course pacing.
{
  // the ID of the blackout date
  "id": 1,
  // the context owning the blackout date
  "context_id": 1,
  "context_type": "Course",
  // the start date of the blackout date
  "start_date": "2022-01-01",
  // the end date of the blackout date
  "end_date": "2022-01-02",
  // title of the blackout date
  "event_title": "some title"
}

BlackoutDatesController#index

GET /api/v1/courses/:course_id/blackout_dates

Scope: url:GET|/api/v1/courses/:course_id/blackout_dates

GET /api/v1/accounts/:account_id/blackout_dates

Scope: url:GET|/api/v1/accounts/:account_id/blackout_dates

Returns the list of blackout dates for the current context.

Returns a list of BlackoutDate objects.

BlackoutDatesController#show

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

Scope: url:GET|/api/v1/courses/:course_id/blackout_dates/:id

Scope: url:GET|/api/v1/accounts/:account_id/blackout_dates/:id

Returns the blackout date with the given id.

Returns a object.

Scope: url:GET|/api/v1/courses/:course_id/blackout_dates/new

Scope: url:GET|/api/v1/accounts/:account_id/blackout_dates/new

Initialize an unsaved Blackout Date for the given context.

Returns a object.

Scope: url:POST|/api/v1/courses/:course_id/blackout_dates

Scope: url:POST|/api/v1/accounts/:account_id/blackout_dates

Create a blackout date for the given context.

Parameter
Type
Description

Returns a object.

Scope: url:PUT|/api/v1/courses/:course_id/blackout_dates/:id

Scope: url:PUT|/api/v1/accounts/:account_id/blackout_dates/:id

Update a blackout date for the given context.

Parameter
Type
Description

Returns a object.

Scope: url:DELETE|/api/v1/courses/:course_id/blackout_dates/:id

Scope: url:DELETE|/api/v1/accounts/:account_id/blackout_dates/:id

Delete a blackout date for the given context.

Returns a object.

Scope: url:PUT|/api/v1/courses/:course_id/blackout_dates

Create, update, and delete blackout dates to sync the db with the incoming data.

Parameter
Type
Description

This documentation is generated directly from the Canvas LMS source code, available .

start_date

Date

The start date of the blackout date.

end_date

Date

start_date

Date

The start date of the blackout date.

end_date

Date

blackout_dates:

string

[blackout_date, ...] An object containing the array of BlackoutDates we want to exist after this operation. For array entries, if it has an id it will be updated, if not created, and if an existing BlackoutDate id is missing from the array, it will be deleted.

GET /api/v1/accounts/:account_id/blackout_dates/:id

GET /api/v1/courses/:course_id/blackout_dates/new

GET /api/v1/accounts/:account_id/blackout_dates/new

POST /api/v1/courses/:course_id/blackout_dates

POST /api/v1/accounts/:account_id/blackout_dates

Request Parameters:

PUT /api/v1/courses/:course_id/blackout_dates/:id

PUT /api/v1/accounts/:account_id/blackout_dates/:id

Request Parameters:

DELETE /api/v1/courses/:course_id/blackout_dates/:id

DELETE /api/v1/accounts/:account_id/blackout_dates/:id

PUT /api/v1/courses/:course_id/blackout_dates

Request Parameters:

BlackoutDate
BlackoutDatesController#new
BlackoutDate
BlackoutDatesController#create
BlackoutDate
BlackoutDatesController#update
BlackoutDate
BlackoutDatesController#destroy
BlackoutDate
BlackoutDatesController#bulk_update
on Github
List blackout dates
Get a single blackout date

The end date of the blackout date.

event_title

string

The title of the blackout date.

The end date of the blackout date.

event_title

string

The title of the blackout date.

New Blackout Date
Create Blackout Date
Update Blackout Date
Delete Blackout Date
Update a list of Blackout Dates