Pearson
Always Learning

API Group: 

Retrieves the meta information about the questions in a exam section, this includes the question type and points possible for that question. Each item also suppliesz a URL to retrieve the text of the exam question. You'll need to repeat this request for every section in the exam.

You can use this API without having started an attempt, however to retrieve the text of the question and possible answers, you must start an attempt.



Supported Roles and Authentication Protocols

Type Supported Values
Authentication Protocols OAuth 1.0a, OAuth 2.0
Valid for Roles (OAuth 2): Professor, Teaching Assistant, Student, Administrator

API Request

API Endpoints

HTTP Verbs and URIs

GET /users/{userId}/courses/{courseId}/exams/{examId}/sections/{sectionId}/questions{.format}
  • Retrieves an array of of the user's questions in an exam section.
GET /users/{userId}/courses/{courseId}/exams/{examId}/sections/{sectionId}/questions/{questionId}{.format}
  • Retrieves a specific question from a section, selected by question ID.

Parameters

Parameter Description Valid Values
{userId} LearningStudio User ID or relevant user overload.
  • Numeric ID issued by LearningStudio
  • loginid={clientString}|{username}
  • or replace /users/{userId} with /me
    (OAuth 2 only)
{courseId} LearningStudio Course ID or relevant course overload.
  • Numeric ID issued by LearningStudio
  • ccn={callNumber}
{examId} LearningStudio Exam ID. Numeric ID issued by LearningStudio
{sectionId} LearningStudio Exam Section ID. Numeric ID issued by LearningStudio
{questionId} LearningStudio Question ID. Numeric ID issued by LearningStudio
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

No Query String Parameters are supported.

Request Body

None

API Response

Response Header

This API returns the standard HTTP Status Codes used by the LearningStudio APIs. There are no special headers returned by the API.

Response Body

Format

{
  "questions" : [{
    "id" : "{questionId}",
    "type" : "{questionType}",
    "pointsPossible" : "{pointsPossible}",
    "links" : [{
      "href" : "{sectionHref}",
      "rel" : "http://api.learningstudio.com/rels/user/course/exam/section"
    },{
      "href" : "{questionDetailHref}",
      "rel" : "http://api.learningstudio.com/rels/user/course/exam/section/{questionType}"
    }]
  },{
    "id" : "{questionId}",
    "type" : "{questionType}",
    "pointsPossible" : "{pointsPossible}",
    "links" : [{
      "href" : "{sectionHref}",
      "rel" : "http://api.learningstudio.com/rels/user/course/exam/section"
    },{
      "href" : "{questionDetailHref}",
      "rel" : "http://api.learningstudio.com/rels/user/course/exam/section/{questionType}Question"
    }]
  }]
}

Property Descriptions

Name Description
{questionId} Question ID.
{questionType} Type of question. Possible values are:

  • TrueFalse
  • MultipleChoice
  • ManyMultipleChoice
  • Matching
  • FillInTheBlank
  • Short (for Short Answer)
  • Essay

Note that each type of question has a different format for {questionDetailHref}.

{pointsPossible} Number of points the user will get for a correct answer to this question to two decimal places. If no value was entered, this will have a value of -1. If the instructor explicitly set the value as zero, this will have a value of  .
{sectionHref} A URL to retrieve the details of the section that contains this question.
{questionDetailHref} A URL to retrieve the text and details of the question. Important: you should not parse this URL to find or store the IDs, because each type of question will have a differently formatted URL. Instead, use a GET request against this complete URL to retrieve the question detail. Learn more.

Example

Request

Endpoint

GET /users/88888/courses/4321/exams/999999/sections/67890/questions

Response

Body

{
  "questions" : [{
    "id" : 11111,
    "type" : "TrueFalse",
    "pointsPossible" : 5,
    "links" : [{
      "href" : "https://api.learningstudio.com/users/88888/courses/123456/exams/999999/sections/67890",
      "rel" : "https://api.learningstudio.com/rels/user/course/exam/section"
    },{
      "href" : "https://api.learningstudio.com/users/88888/courses/123456/exams/999999/sections/67890/trueFalseQuestions/11111",
      "rel" : "https://api.learningstudio.com/rels/user/course/exam/section/trueFalseQuestion"
    }]
  },{
    "id" : 11112,
    "type" : "MultipleChoice",
    "pointsPossible" : 10,
    "links" : [{
      "href" : "https://api.learningstudio.com/users/88888/courses/123456/exams/999999/sections/67890",
      "rel" : "https://api.learningstudio.com/rels/user/course/exam/section"
    },{
      "href" : "https://api.learningstudio.com/users/88888/courses/123456/exams/999999/sections/67890/multipleChoiceQuestions/11112",
      "rel" : "https://api.learningstudio.com/rels/user/course/exam/section/multipleChoiceQuestion"
    }]
  }]
}
3622 reads
Always Learning
Pearson