LTI Resource Links
API that exposes LTI Resource Links for viewing and editing. LTI Resource Links are artifacts created by the LTI 1.3 Deep Linking process, where a user selects a content item that is returned to Canvas for future launches.
Resource Links can be associated with Assignments, Module Items, Collaborations, and Rich Content embeddings.
Use of this API requires the manage_lti_add
and manage_assignments_add
permissions.
Caution! Resource Links are usually managed by the tool that created them via LTI Deep Linking, and using this API to create or modify links may result in errors when launching the link.
Common patterns for using this API include:
facilitating migration between two different versions of the same tool by updating the domain of the launch URL
creating new links to embed in rich content in Canvas
responding to a course copy or other Canvas content migration by updating the launch URL
A Lti::ResourceLink object looks like:
Lti::ResourceLinksController#index
GET /api/v1/courses/:course_id/lti_resource_links
GET /api/v1/courses/:course_id/lti_resource_links
Scope: url:GET|/api/v1/courses/:course_id/lti_resource_links
Returns all Resource Links in the specified course. This includes links that are associated with Assignments, Module Items, Collaborations, and that are embedded in rich content. This endpoint is paginated, and will return 50 links per page by default. Links are sorted by the order in which they were created.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Include deleted resource links and links associated with deleted content in response. Default is false. |
|
| The number of registrations to return per page. Defaults to 50. |
Example Request:
Returns a list of Lti::ResourceLink objects.
Lti::ResourceLinksController#show
GET /api/v1/courses/:course_id/lti_resource_links/:id
GET /api/v1/courses/:course_id/lti_resource_links/:id
Scope: url:GET|/api/v1/courses/:course_id/lti_resource_links/:id
Return details about the specified resource link. The ID can be in the standard Canvas format (“1”), or in these special formats:
resource_link_uuid:<uuid> - Find the resource link by its resource_link_uuid
lookup_uuid:<uuid> - Find the resource link by its lookup_uuid
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| Include deleted resource links in search. Default is false. |
Example Request:
Returns a Lti::ResourceLink object.
Lti::ResourceLinksController#create
POST /api/v1/courses/:course_id/lti_resource_links
POST /api/v1/courses/:course_id/lti_resource_links
Scope: url:POST|/api/v1/courses/:course_id/lti_resource_links
Create a new LTI Resource Link in the specified course with the provided parameters.
Caution! Resource Links are usually created by the tool via LTI Deep Linking. The tool has no knowledge of links created via this API, and may not be able to handle or launch them.
Links created using this API cannot be associated with a specific piece of Canvas content, like an Assignment, Module Item, or Collaboration. Links created using this API are only suitable for embedding in rich content using the ‘canvas_launch_url` provided in the API response.
This link will be associated with the ContextExternalTool available in this context that matches the provided url. If a matching tool is not found, the link will not be created and this will return an error.
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | The launch URL for this resource link. |
|
| The title of the resource link. |
|
| Custom parameters to be sent to the tool when launching this link. |
Example Request:
Returns a Lti::ResourceLink object.
Lti::ResourceLinksController#bulk_create
POST /api/v1/courses/:course_id/lti_resource_links/bulk
POST /api/v1/courses/:course_id/lti_resource_links/bulk
Scope: url:POST|/api/v1/courses/:course_id/lti_resource_links/bulk
Create up to 100 new LTI Resource Links in the specified course with the provided parameters.
Caution! Resource Links are usually created by the tool via LTI Deep Linking. The tool has no knowledge of links created via this API, and may not be able to handle or launch them.
Links created using this API cannot be associated with a specific piece of Canvas content, like an Assignment, Module Item, or Collaboration. Links created using this API are only suitable for embedding in rich content using the ‘canvas_launch_url` provided in the API response.
Each link will be associated with the ContextExternalTool available in this context that matches the provided url. If a matching tool is not found, or any parameters are invalid, no links will be created and this will return an error.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| body [Required, Array] The POST body should be a JSON array of objects containing the parameters for each link to create. |
| Required | Each object must contain a launch URL. |
|
| Each object may contain a title. |
|
| Custom parameters to be sent to the tool when launching this link. |
Example Request:
Returns a Lti::ResourceLink object.
Lti::ResourceLinksController#update
PUT /api/v1/courses/:course_id/lti_resource_links/:id
PUT /api/v1/courses/:course_id/lti_resource_links/:id
Scope: url:PUT|/api/v1/courses/:course_id/lti_resource_links/:id
Update the specified resource link with the provided parameters.
Caution! Changing existing links may result in launch errors.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| The launch URL for this resource link. Caution! Updating this to a URL that doesn’t match the tool could result in errors when launching this link! |
|
| Custom parameters to be sent to the tool when launching this link. Caution! Changing these from what the tool provided could result in errors if the tool doesn’t see what it’s expecting. |
|
| Update link even if it is deleted. Default is false. |
Example Request:
Returns a Lti::ResourceLink object.
Lti::ResourceLinksController#destroy
DELETE /api/v1/courses/:course_id/lti_resource_links/:id
DELETE /api/v1/courses/:course_id/lti_resource_links/:id
Scope: url:DELETE|/api/v1/courses/:course_id/lti_resource_links/:id
Delete the specified resource link. The ID can be in the standard Canvas format (“1”), or in these special formats:
resource_link_uuid:<uuid> - Find the resource link by its resource_link_uuid
lookup_uuid:<uuid> - Find the resource link by its lookup_uuid
Only links that are not associated with Assignments, Module Items, or Collaborations can be deleted.
Example Request:
Returns a Lti::ResourceLink object.
© Instructure, Inc. Generated on Wed Nov 6 14:20:07 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated