Content Shares
API for creating, accessing and updating Content Sharing. Content shares are used to share content directly between users.
A ContentShare object looks like:
ContentSharesController#create
POST /api/v1/users/:user_id/content_shares
POST /api/v1/users/:user_id/content_shares
Scope: url:POST|/api/v1/users/:user_id/content_shares
Share content directly between two or more users
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | IDs of users to share the content with. |
| Required | Type of content you are sharing. Allowed values: |
| Required | The id of the content that you are sharing |
Example Request:
Returns a ContentShare object.
GET /api/v1/users/:user_id/content_shares/sent
GET /api/v1/users/:user_id/content_shares/sent
Scope: url:GET|/api/v1/users/:user_id/content_shares/sent
GET /api/v1/users/:user_id/content_shares/received
GET /api/v1/users/:user_id/content_shares/received
Scope: url:GET|/api/v1/users/:user_id/content_shares/received
Return a paginated list of content shares a user has sent or received. Use self
as the user_id to retrieve your own content shares. Only linked observers and administrators may view other users’ content shares.
Example Request:
Returns a list of ContentShare objects.
ContentSharesController#unread_count
GET /api/v1/users/:user_id/content_shares/unread_count
GET /api/v1/users/:user_id/content_shares/unread_count
Scope: url:GET|/api/v1/users/:user_id/content_shares/unread_count
Return the number of content shares a user has received that have not yet been read. Use self
as the user_id to retrieve your own content shares. Only linked observers and administrators may view other users’ content shares.
Example Request:
GET /api/v1/users/:user_id/content_shares/:id
GET /api/v1/users/:user_id/content_shares/:id
Scope: url:GET|/api/v1/users/:user_id/content_shares/:id
Return information about a single content share. You may use self
as the user_id to retrieve your own content share.
Example Request:
Returns a ContentShare object.
ContentSharesController#destroy
DELETE /api/v1/users/:user_id/content_shares/:id
DELETE /api/v1/users/:user_id/content_shares/:id
Scope: url:DELETE|/api/v1/users/:user_id/content_shares/:id
Remove a content share from your list. Use self
as the user_id. Note that this endpoint does not delete other users’ copies of the content share.
Example Request:
ContentSharesController#add_users
POST /api/v1/users/:user_id/content_shares/:id/add_users
POST /api/v1/users/:user_id/content_shares/:id/add_users
Scope: url:POST|/api/v1/users/:user_id/content_shares/:id/add_users
Send a previously created content share to additional users
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| IDs of users to share the content with. |
Example Request:
Returns a ContentShare object.
ContentSharesController#update
PUT /api/v1/users/:user_id/content_shares/:id
PUT /api/v1/users/:user_id/content_shares/:id
Scope: url:PUT|/api/v1/users/:user_id/content_shares/:id
Mark a content share read or unread
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Read state for the content share Allowed values: |
Example Request:
Returns a ContentShare object.
© 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