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
      • API Reference
        • Captions
        • Collection
        • Courses
        • Group
        • Insights
        • Media
        • Media Upload
        • Ping
        • Professional Captioning
        • Tags
        • Transfer Media
        • User
    • Quizzes
      • Quiz API
Powered by GitBook

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

On this page

Was this helpful?

  1. Services
  2. Quizzes

Quiz API

PreviousQuizzes

Last updated 12 months ago

Was this helpful?

batch_show

get
Query parameters
idsstring[]OptionalExample: ["160","161"]
Responses
404
returns nothing when none of the banks belong to authorized user
application/json
get
GET /api/banks/batch_show HTTP/1.1
Host: 
Accept: */*
404

returns nothing when none of the banks belong to authorized user

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

create

post
Responses
404
populates the export_settings field with the given export_settings param
application/json
post
POST /api/content_exports HTTP/1.1
Host: 
Accept: */*
404

populates the export_settings field with the given export_settings param

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

create

post
Responses
404
example at ./spec/requests/api/v1/courses_controller_spec.rb:208
application/json
post
POST /api/courses HTTP/1.1
Host: 
Accept: */*
404

example at ./spec/requests/api/v1/courses_controller_spec.rb:208

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

destroy

delete
Path parameters
canvas_idintegerRequiredExample: 9999
Responses
404
is expected to be not found
application/json
delete
DELETE /api/courses/{canvas_id} HTTP/1.1
Host: 
Accept: */*
404

is expected to be not found

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

update

put
Path parameters
canvas_idintegerRequiredExample: 201
Responses
404
is expected to be not found
application/json
put
PUT /api/courses/{canvas_id} HTTP/1.1
Host: 
Accept: */*
404

is expected to be not found

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

associate_courses

patch
Path parameters
canvas_idintegerRequiredExample: 196
Responses
404
associates courses which have previously been archived
application/json
patch
PATCH /api/courses/{canvas_id}/associate_courses HTTP/1.1
Host: 
Accept: */*
404

associates courses which have previously been archived

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

associate_quizzes

patch
Path parameters
canvas_idintegerRequiredExample: 550000000000154
Responses
404
replaces the local canvas_id with the global canavs_id
application/json
patch
PATCH /api/courses/{canvas_id}/associate_quizzes HTTP/1.1
Host: 
Accept: */*
404

replaces the local canvas_id with the global canavs_id

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

check_shareability

post
Responses
404
is expected to be bad request
application/json
post
POST /api/items/check_shareability HTTP/1.1
Host: 
Accept: */*
404

is expected to be bad request

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

create_batch

post
Responses
404
is expected to be unprocessable
application/json
post
POST /api/quiz_clone_jobs/create_batch HTTP/1.1
Host: 
Accept: */*
404

is expected to be unprocessable

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

index

get
Query parameters
idsstring[]OptionalExample: ["1674","1675","1676","1677","1678","1679","1680","1681","1682","1683","1684","1685","1686","1687","1688","1689","1690","1691","1692","1693","1694","1695","1696","1697","1698","1699","1700","1701","1702","1703","1704","1705","1706","1707","1708","1709","1710","1711","1712","1713","1714","1715","1716","1717","1718","1719","1720","1721","1722","1723","1724"]
quiz_idintegerOptionalExample: 3499
Responses
404
returns all the quiz sessions without paginating
application/json
get
GET /api/quiz_sessions HTTP/1.1
Host: 
Accept: */*
404

returns all the quiz sessions without paginating

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

show

get
Path parameters
idintegerRequiredExample: 1764
Query parameters
disable_ac_invalidationstringOptionalExample: true
idintegerOptionalExample: 1764
quiz_idintegerOptionalExample: 3533
quiz_session_idintegerOptionalExample: 1436
Responses
404
does not invalidate the student access code
application/json
get
GET /api/quiz_sessions/{id} HTTP/1.1
Host: 
Accept: */*
404

does not invalidate the student access code

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

time

get
Path parameters
idintegerRequiredExample: 145
Responses
200
then the elapsed time should be the sum of the previous and current attempt
application/json
get
GET /api/quiz_sessions/{id}/time HTTP/1.1
Host: 
Accept: */*
200

then the elapsed time should be the sum of the previous and current attempt

{
  "timer_running": false,
  "time_left_in_seconds": 170
}

index

get
Path parameters
quiz_session_idintegerRequiredExample: 146
Query parameters
formatstringOptionalExample: json
Responses
200
then the assignment will autosubmit and cannot be resumed
application/json
get
GET /api/quiz_sessions/{quiz_session_id}/quiz_session_response_events HTTP/1.1
Host: 
Accept: */*
200

then the assignment will autosubmit and cannot be resumed

[]

index

get
Path parameters
quiz_session_idintegerRequiredExample: 160
Responses
200
should not modify the session response data
application/json
get
GET /api/quiz_sessions/{quiz_session_id}/session_item_responses HTTP/1.1
Host: 
Accept: */*
200

should not modify the session response data

[
  {
    "attempt": 1,
    "position": 1,
    "item_id": "877",
    "user_response": {
      "value": [
        "dbf5d3e1-e92e-45ba-8151-5f67095d8add",
        "b3227f8d-47ac-48cc-a2df-ce7768dc6d93"
      ]
    }
  },
  {
    "attempt": 1,
    "position": 2,
    "item_id": "878",
    "user_response": {
      "value": "b2d93c86-caaa-4fdc-b32f-7ed692384ffa"
    }
  }
]

create_batch

post
Responses
404
returns created: false
application/json
post
POST /api/quiz_sync_jobs/create_batch HTTP/1.1
Host: 
Accept: */*
404

returns created: false

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

index

get
Query parameters
context_idintegerOptionalExample: 2462
formatstringOptionalExample: json
quiz_idsstring[]OptionalExample: ["2762","2764"]
versionintegerOptionalExample: 1
Responses
401
uses v1 endpoints by default
application/json
404
fails with not_found if any one quiz is missing
application/json
get
GET /api/quizzes HTTP/1.1
Host: 
Accept: */*
{
  "error": "Nil JSON web token",
  "errors": [
    {
      "error_type": "JWT::DecodeError",
      "message": "Nil JSON web token"
    }
  ]
}

create

post
Path parameters
quiz_idintegerRequiredExample: 1461
Responses
404
does not create a bank share job
application/json
post
POST /api/quizzes/{quiz_id}/quiz_clone_jobs HTTP/1.1
Host: 
Accept: */*
404

does not create a bank share job

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

check_shareability

post
Responses
404
indicates the content is shareable
application/json
post
POST /api/stimuli/check_shareability HTTP/1.1
Host: 
Accept: */*
404

indicates the content is shareable

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}

index

get
Query parameters
filterstringOptionalExample: a
pageintegerOptionalExample: 1
per_pageintegerOptionalExample: 1
Responses
404
paginates properly
application/json
get
GET /api/tags HTTP/1.1
Host: 
Accept: */*
404

paginates properly

{
  "error": "Unknown host",
  "errors": [
    {
      "error_type": "ActiveRecord::RecordNotFound",
      "message": "Unknown host"
    }
  ]
}
  • GETbatch_show
  • POSTcreate
  • POSTcreate
  • DELETEdestroy
  • PUTupdate
  • PATCHassociate_courses
  • PATCHassociate_quizzes
  • POSTcheck_shareability
  • POSTcreate_batch
  • GETindex
  • GETshow
  • GETtime
  • GETindex
  • GETindex
  • POSTcreate_batch
  • GETindex
  • POSTcreate
  • POSTcheck_shareability
  • GETindex