Account Notifications
API for account notifications.
An AccountNotification object looks like:
AccountNotificationsController#user_index
GET /api/v1/accounts/:account_id/account_notifications
GET /api/v1/accounts/:account_id/account_notifications
Scope: url:GET|/api/v1/accounts/:account_id/account_notifications
Returns a list of all global notifications in the account for the current user Any notifications that have been closed by the user will not be returned, unless a include_past parameter is passed in as true.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Include past and dismissed global announcements. |
Example Request:
Returns a list of AccountNotification objects.
AccountNotificationsController#show
GET /api/v1/accounts/:account_id/account_notifications/:id
GET /api/v1/accounts/:account_id/account_notifications/:id
Scope: url:GET|/api/v1/accounts/:account_id/account_notifications/:id
Returns a global notification for the current user A notification that has been closed by the user will not be returned
Example Request:
Returns an AccountNotification object.
AccountNotificationsController#user_close_notification
DELETE /api/v1/accounts/:account_id/account_notifications/:id
DELETE /api/v1/accounts/:account_id/account_notifications/:id
Scope: url:DELETE|/api/v1/accounts/:account_id/account_notifications/:id
If the current user no long wants to see this notification it can be excused with this call
Example Request:
Returns an AccountNotification object.
AccountNotificationsController#create
POST /api/v1/accounts/:account_id/account_notifications
POST /api/v1/accounts/:account_id/account_notifications
Scope: url:POST|/api/v1/accounts/:account_id/account_notifications
Create and return a new global notification for an account.
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | The subject of the notification. |
| Required | The message body of the notification. |
| Required | The start date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z |
| Required | The end date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z |
|
| The icon to display with the notification. Note: Defaults to warning. Allowed values: |
|
| The role(s) to send global notification to. Note: ommitting this field will send to everyone Example:
|
Example Request:
Example Response:
AccountNotificationsController#update
PUT /api/v1/accounts/:account_id/account_notifications/:id
PUT /api/v1/accounts/:account_id/account_notifications/:id
Scope: url:PUT|/api/v1/accounts/:account_id/account_notifications/:id
Update global notification for an account.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| The subject of the notification. |
|
| The message body of the notification. |
|
| The start date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z |
|
| The end date and time of the notification in ISO8601 format. e.g. 2014-01-01T01:00Z |
|
| The icon to display with the notification. Allowed values: |
|
| The role(s) to send global notification to. Note: ommitting this field will send to everyone Example:
|
Example Request:
Example Response:
© Instructure, Inc. Generated on Wed Nov 6 14:20:04 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated