LTI Resource Links API

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.

A Lti::ResourceLink object looks like:

{
  // The Canvas identifier for the LTI Resource Link.
  "id": 1,
  // The Canvas identifier for the context that the LTI Resource Link is
  // associated with.
  "context_id": 1,
  // The type of the context that the LTI Resource Link is associated with.
  "context_type": "Course",
  // The Canvas identifier for the LTI 1.3 External Tool that the LTI Resource
  // Link was originally installed from. Note that this tool may have been deleted
  // or reinstalled and may not be the tool that would be launched for this url.
  "context_external_tool_id": 1,
  // The type of Canvas content for the resource link. Included for convenience.
  "resource_type": "assignment",
  // The LTI identifier for the LTI Resource Link, included as the
  // resource_link_id when this link is launched
  "resource_link_uuid": "ae43ba23-d238-49bc-ab55-ba7f79f77896",
  // A unique identifier for the LTI Resource Link, present in the rich content
  // representation. Remains the same across content migration.
  "lookup_uuid": "c522554a-d4be-49ef-b163-9c87fdc6ad6f",
  // The title of the LTI Resource Link. Usually tool-provided, or matches the
  // assignment name
  "title": "Assignment 1",
  // The tool URL to which the LTI Resource Link will launch
  "url": "https://example.com/lti/launch/content_item/123",
  // The LTI 1.1 identifier for the LTI Resource Link, included in lti1p1
  // migration claim when launched. Only present if tool was migrated from 1.1 to
  // 1.3.
  "lti_1_1_id": "6a8aaca162bfc4393804afd4cd53cd94413c48bb",
  // Timestamp of the resource link's creation
  "created_at": "2024-01-01T00:00:00Z",
  // Timestamp of the resource link's last update
  "updated_at": "2024-01-01T00:00:00Z",
  // The state of the resource link
  "workflow_state": "active"
}

List LTI Resource Links Lti::ResourceLinksController#index

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 boolean

Include deleted resource links and links associated with deleted content in response. Default is false.

per_page integer

The number of registrations to return per page. Defaults to 50.

Example Request:

This would return the first 50 LTI resource links for the course, with a Link header pointing to the next page
curl -X GET 'https://<canvas>/api/v1/courses/<course_id>/lti_resource_links' \
    -H "Authorization: Bearer <token>" \
Returns a list of Lti::ResourceLink objects

Show an LTI Resource Link Lti::ResourceLinksController#show

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 boolean

Include deleted resource links in search. Default is false.

Example Request:

This would return the specified LTI resource link
curl -X GET 'https://<canvas>/api/v1/courses/<course_id>/lti_resource_links/lookup_uuid:<resource_link_lookup_uuid>' \
    -H "Authorization: Bearer <token>"
Returns a Lti::ResourceLink object

Update an LTI Resource Link Lti::ResourceLinksController#update

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

Request Parameters:

Parameter Type Description
url string

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 Hash

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.

include_deleted boolean

Include deleted resource links in search. Default is false.

Example Request:

This would update the specified LTI resource link
curl -X PUT 'https://<canvas>/api/v1/courses/<course_id>/lti_resource_links/<id>' \
    -H "Authorization: Bearer <token>" \
    -d 'url=https://example.com/lti/launch/new_content_item/456'
    -d 'custom[hello]=world'
Returns a Lti::ResourceLink object