Instructure Developer Documentation Portal
Community
  • Introduction
  • Services
    • Elevate Standards Alignment - AB Connect API
      • Introduction
        • Authentication
        • Addressing Object Properties
        • Requesting Additional Properties in the Response
        • Filtering Using ODATA Like Statements
        • Sorting
        • Facets
        • Paging Data
        • Call Throttling
        • Working with Related Object
        • Error Responses
        • Character Set Support
        • How To Articles, Recommendations and Suggestions
        • Examples
        • Using AB Connect's Embeddable Widgets
      • Reference
        • Standards
        • Standard Collections
        • Events
        • Topics
        • Concepts
        • Assets
        • Asset Definitions
        • Asset Collections
        • Managing and Predicting Relationships
        • Providers
    • Canvas LMS
      • Basics
        • GraphQL
        • API Change Log
        • SIS IDs
        • Pagination
        • Throttling
        • Compound Documents
        • File Uploads
        • API Endpoint Attributes
        • Masquerading
      • OAuth2
        • OAuth2 Overview
        • OAuth2 Endpoints
        • Developer Keys
      • Resources
        • Access Tokens
        • Account Calendars
        • Account Domain Lookups
        • Account Notifications
        • Account Reports
        • Accounts
        • Accounts (LTI)
        • Admins
        • Analytics
        • Announcement External Feeds
        • Announcements
        • API Token Scopes
        • Appointment Groups
        • Assignment Extensions
        • Assignment Groups
        • Assignments
        • Authentication Providers
        • Authentications Log
        • Blackout Dates
        • BlockEditorTemplate
        • Blueprint Courses
        • Bookmarks
        • Brand Configs
        • Calendar Events
        • Collaborations
        • CommMessages
        • Communication Channels
        • Conferences
        • Content Exports
        • Content Migrations
        • Content Security Policy Settings
        • Content Shares
        • Conversations
        • Course Audit log
        • Course Pace
        • Course Quiz Extensions
        • Course Reports
        • Courses
        • Custom Gradebook Columns
        • Developer Key Account Bindings
        • Developer Keys
        • Discussion Topics
        • Enrollment Terms
        • Enrollments
        • ePortfolios
        • ePub Exports
        • Error Reports
        • External Tools
        • Favorites
        • Feature Flags
        • Files
        • Grade Change Log
        • Gradebook History
        • Grading Period Sets
        • Grading Periods
        • Grading Standards
        • Group Categories
        • Groups
        • History
        • InstAccess tokens
        • JWTs
        • Late Policy
        • Learning Object Dates
        • Line Items
        • LiveAssessments
        • Logins
        • LTI Launch Definitions
        • LTI Registrations
        • LTI Resource Links
        • Media Objects
        • Moderated Grading
        • Modules
        • Names and Role
        • New Quiz Items
        • New Quizzes
        • New Quizzes Accommodations
        • New Quizzes Reports
        • Notification Preferences
        • Originality Reports
        • Outcome Groups
        • Outcome Imports
        • Outcome Results
        • Outcomes
        • Pages
        • Peer Reviews
        • Planner
        • Poll Sessions
        • PollChoices
        • Polls
        • PollSubmissions
        • Proficiency Ratings
        • Progress
        • Public JWK
        • Quiz Assignment Overrides
        • Quiz Extensions
        • Quiz IP Filters
        • Quiz Question Groups
        • Quiz Questions
        • Quiz Reports
        • Quiz Statistics
        • Quiz Submission Events
        • Quiz Submission Files
        • Quiz Submission Questions
        • Quiz Submission User List
        • Quiz Submissions
        • Quizzes
        • Result
        • Roles
        • Rubrics
        • Sandboxes
        • Score
        • Search
        • Sections
        • Services
        • Shared Brand Configs
        • SIS Import Errors
        • SIS Imports
        • SIS Integration
        • Smart Search
        • Submission Comments
        • Submissions
        • Tabs
        • Temporary Enrollment Pairings
        • User Observees
        • Users
        • What If Grades
      • Outcomes
        • Outcomes CSV Format
      • Group Categories
        • Group Categories CSV Format
      • SIS
        • SIS CSV Format
      • External Tools
        • LTI
          • Introduction
          • Registration
          • Launch Overview
          • Configuring
          • Variable Substitutions
          • Deep Linking
          • Grading
          • Provisioning
          • PostMessage
          • Platform Notification Service
          • Placements
            • Placements Overview
            • Navigation
            • Homework Submission
            • Editor Button
            • Migration Selection
            • Link Selection (Modules)
            • Assignment Selection
            • Collaborations
        • xAPI
        • Canvas Roles
        • Plagiarism Detection Platform
          • Overview
          • Plagiarism Detection Platform Assignments
          • Plagiarism Detection Platform Users
          • Plagiarism Detection Submissions
          • Webhooks Subscriptions for Plagiarism Platform
          • JWT Access Tokens
      • Data Services
        • Live Events
          • Overview
            • Introduction
            • Setup
            • Caliper
            • Metadata
          • Event Format
            • Canvas
              • Account
              • Asset
              • Assignment
              • Attachment
              • Content
              • Conversation
              • Course
              • Discussion
              • Enrollment
              • Grade
              • Group
              • Learning
              • Logged
              • Module
              • Outcome
              • Outcomes
              • Plagiarism
              • Quiz
              • Rubric
              • Sis
              • Submission
              • Syllabus
              • User
              • Wiki
            • Caliper IMS 1.1
              • Assessment
              • Basic
              • Forum
              • Grading
              • Navigation Events
              • Session
    • Catalog
      • APIs
        • Analytics
        • Bulk Enrollments
        • Catalogs
        • Certificates
        • Completed Certificates
        • Courses
        • Email Domain Set
        • Enrollments
        • Orders
        • Programs
        • Progresses
        • Tags
        • User Registrations
        • Users
        • Waitlist Applicants
    • Credentials
      • Getting Started
      • Authentication
        • Password-Based Authentication
        • Authorization Code-Based Authentication
      • Pagination
      • APIs
        • Assertions
        • Backpack
        • Badgeclasses
        • Issuers
        • Organizations
        • Users
      • Release Notes
    • Data Access Platform
      • Key Concepts
      • Data Formats
      • Rate Limits & Policies
      • Datasets
        • Namespaces
          • canvas
            • canvas types
          • canvas_logs
          • catalog
        • Additional Notes
        • Entity Relationship Diagram
      • Query API
        • Authentication
        • Reference
      • Command Line (DAP CLI)
        • Getting Started
        • Secure Connection
        • Reference
          • dap snapshot
          • dap incremental
          • dap list
          • dap schema
          • dap initdb
          • dap syncdb
          • dap dropdb
      • Client Library
        • Examples
        • Reference
      • Release Notes
      • Status
    • DataSync
      • Interop API
      • Interop Data API
      • Grades Exchange API
      • OneRoster API
      • Platform API
    • Instructure Media
      • Studio API
    • Quizzes
      • Quiz API
Powered by GitBook

Copyright © 2008-2024 Instructure, Inc. All rights reserved. Various trademarks held by their respective owners.

On this page
  • Create a Line Item
  • Update a Line Item
  • Show a Line Item
  • List line Items
  • Delete a Line Item

Was this helpful?

  1. Services
  2. Canvas LMS
  3. Resources

Line Items

Line Item API for IMS Assignment and Grade Services

A LineItem object looks like:

{
  // The fully qualified URL for showing, updating, and deleting the Line Item
  "id": "http://institution.canvas.com/api/lti/courses/5/line_items/2",
  // The maximum score of the Line Item
  "scoreMaximum": 50,
  // The label of the Line Item.
  "label": "50",
  // Tag used to qualify a line Item beyond its ids
  "tag": "50",
  // A Tool Provider specified id for the Line Item. Multiple line items can share
  // the same resourceId within a given context
  "resourceId": "50",
  // The resource link id the Line Item is attached to
  "resourceLinkId": "50",
  // The extension that defines the submission_type of the line_item. Only returns
  // if set through the line_item create endpoint.
  "https://canvas.instructure.com/lti/submission_type": "{
  	"type":"external_tool",
  	"external_tool_url":"https://my.launch.url",
  }",
  // The launch url of the Line Item. Only returned if `include=launch_url` query
  // parameter is passed, and only for Show and List actions.
  "https://canvas.instructure.com/lti/launch_url": "https://my.tool.url/launch"
}

POST /api/lti/courses/:course_id/line_items

Scope: url:POST|/api/lti/courses/:course_id/line_items

Create a new Line Item

Request Parameters:

Parameter
Type
Description

scoreMaximum

Required number

The maximum score for the line item. Scores created for the Line Item may exceed this value.

label

Required string

The label for the Line Item. If no resourceLinkId is specified this value will also be used as the name of the placeholder assignment.

resourceId

string

A Tool Provider specified id for the Line Item. Multiple line items may share the same resourceId within a given context.

tag

string

A value used to qualify a line Item beyond its ids. Line Items may be queried by this value in the List endpoint. Multiple line items can share the same tag within a given context.

resourceLinkId

string

The resource link id the Line Item should be attached to. This value should match the LTI id of the Canvas assignment associated with the tool.

startDateTime

string

The ISO8601 date and time when the line item is made available. Corresponds to the assignment’s unlock_at date.

endDateTime

string

The ISO8601 date and time when the line item stops receiving submissions. Corresponds to the assignment’s due_at date.

https://canvas.instructure.com/lti/submission_type

object

(EXTENSION) - Optional block to set Assignment Submission Type when creating a new assignment is created.

  • type - ‘none’ or ‘external_tool’

  • external_tool_url - Submission URL only used when type: ‘external_tool’

Example Request:

{
  "scoreMaximum": 100.0,
  "label": "LineItemLabel1",
  "resourceId": 1,
  "tag": "MyTag",
  "resourceLinkId": "1",
  "startDateTime": "2022-01-31T22:23:11+0000",
  "endDateTime": "2022-02-07T22:23:11+0000",
  "https://canvas.instructure.com/lti/submission_type": {
    "type": "external_tool",
    "external_tool_url": "https://my.launch.url"
  }
}

PUT /api/lti/courses/:course_id/line_items/:id

Scope: url:PUT|/api/lti/courses/:course_id/line_items/:id

Update new Line Item

Request Parameters:

Parameter
Type
Description

scoreMaximum

number

The maximum score for the line item. Scores created for the Line Item may exceed this value.

label

string

The label for the Line Item. If no resourceLinkId is specified this value will also be used as the name of the placeholder assignment.

resourceId

string

A Tool Provider specified id for the Line Item. Multiple line items may share the same resourceId within a given context.

tag

string

A value used to qualify a line Item beyond its ids. Line Items may be queried by this value in the List endpoint. Multiple line items can share the same tag within a given context.

startDateTime

string

The ISO8601 date and time when the line item is made available. Corresponds to the assignment’s unlock_at date.

endDateTime

string

The ISO8601 date and time when the line item stops receiving submissions. Corresponds to the assignment’s due_at date.

GET /api/lti/courses/:course_id/line_items/:id

Scope: url:GET|/api/lti/courses/:course_id/line_items/:id

Show existing Line Item

Request Parameters:

Parameter
Type
Description

include[]

string

Array of additional information to include.

  • “launch_url”

    includes the launch URL for this line item using the “https://canvas.instructure.com/lti/launch_url” extension

Allowed values: launch_url

GET /api/lti/courses/:course_id/line_items

Scope: url:GET|/api/lti/courses/:course_id/line_items

List all Line Items for a course

Request Parameters:

Parameter
Type
Description

tag

string

If specified only Line Items with this tag will be included.

resource_id

string

If specified only Line Items with this resource_id will be included.

resource_link_id

string

If specified only Line Items attached to the specified resource_link_id will be included.

limit

string

May be used to limit the number of Line Items returned in a page

include[]

string

Array of additional information to include.

  • “launch_url”

    includes the launch URL for each line item using the “https://canvas.instructure.com/lti/launch_url” extension

Allowed values: launch_url

DELETE /api/lti/courses/:course_id/line_items/:id

Scope: url:DELETE|/api/lti/courses/:course_id/line_items/:id

Delete an existing Line Item


PreviousLearning Object DatesNextLiveAssessments

Last updated 1 month ago

Was this helpful?

Returns a object.

Returns a object.

Returns a object.

Returns a object.

Returns a object.

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

Lti::Ims::LineItemsController#create
Lti::Ims::LineItemsController#update
Lti::Ims::LineItemsController#show
Lti::Ims::LineItemsController#index
Lti::Ims::LineItemsController#destroy
on Github
Create a Line Item
LineItem
Update a Line Item
LineItem
Show a Line Item
LineItem
List line Items
LineItem
Delete a Line Item
LineItem