Pearson
Always Learning

API Group: 

This API retrieves the top-level structure of an exam. Questions are organized into sections, and there may be one section or many. In the User Interface, a section is analogous to a page, but there is no inherent requirement for how to display questions.

Once you know a section ID from this API request, you use it to retrieve the questions assigned to the section. You must provision an exam instance for a user before you can retrieve the exam sections, but you can retrieve the structure of an exam without having started an attempt.

Note: The Exams APIs do not support the "One Question Per Page" feature found in the LearningStudio Exams User Interface and do not offer a way to know if that feature is set up in the UI. (With that feature, the UI ignores sections to display questions.)



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{.format}
  • Retrieves an array of sections for a user's exam instance.
GET /users/{userId}/courses/{courseId}/exams/{examId}/sections/{sectionId}{.format}
  • Retrieves a specific section, selected by section 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
{.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

{
  "sections" : [{
    "id" : "{sectionId}",
    "title" : "{title}",
    "description" : "{description}",	
    "links" : [{
        "href" : "{examInstanceHref}",
        "rel" : "http://api.learningstudio.com/rels/course/exam"
      },{
        "href" : "{questionsHref}",
        "rel" : "http://api.learningstudio.com/rels/user/course/exam/section/question"
      }]
  }]
}

Property Descriptions

Name Description
{sectionId} The ID for this section.
{title} Title of this section (if supplied).
{description} Descriptive text to be display at the beginning of the section, if supplied (for example, section instructions).
{examInstanceHref} A URL to retrieve the details of the provisioned exam instance.
{questionsHref} A URL to retrieve the questions in this particular section. Important: you should not parse this URL to find or store the IDs. Instead, use a GET request against this complete URL to retrieve the questions list. Learn more.

Example

Request

Endpoint

GET /users/88888/courses/123456/exams/999999/sections

Response

Body

{
  "sections" : [{
    "id" : 12345,
    "title" : "1492 - 1552 The New World",
    "description" : "This section tests your knowledge about the 'New World'",	
    "links" : [{
        "href" : "http://api.learningstudio.com/users/11111/courses/123456/exams/999999",
        "rel" : "http://api.learningstudio.com/rels/course/exam"
      },{
        "href" : "http://api.learningstudio.com/users/11111/courses/123456/exams/999999/sections/12345/questions",
        "rel" : "http://api.learningstudio.com/rels/user/course/exam/section/question"
      }]
    },{
    "id" : 67890,
    "title" : "1553 - 1650 The Changing World",
    "description" : "This section tests your knowledge about the 'Newly Changing World'",
    "links" : [{
        "href" : "http://api.learningstudio.com/users/11111/courses/123456/exams/999999",
        "rel" : "http://api.learningstudio.com/rels/course/exam"
      },{
        "href" : "http://api.learningstudio.com/users/11111/courses/123456/exams/999999/sections/67890/questions",
        "rel" : "http://api.learningstudio.com/rels/user/course/exam/section/question"
    }]
  }]
}
3646 reads
Always Learning
Pearson