Pearson
Always Learning

This API allows you to retrieve, create, update, and delete categories from a course webliography. Only professors and teaching assistants can create or edit categories.

Note: A webliography category is analogous to a "tag" or "label" as displayed in the LearningStudio User Interface. Deleting a category does not delete the entries attached to it.



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

Note: Students can only GET a list of categories.

API Request

API Endpoints

HTTP Verbs and URIs

GET /courses/{courseId}/webliographyCategories{.format}
  • Retrieves all the categories in a course.
GET /courses/{courseId}/webliographyCategories/{categoryId}{.format}
  • Retrieve a single category.
POST /courses/{courseId}/webliographyCategories{.format}
  • Create a category.
PUT /courses/{courseId}/webliographyCategories/{categoryId}{.format}
  • Update a category name.
DELETE /courses/{courseId}/webliographyCategories/{categoryId}{.format}
  • Delete a category.

Parameters

Parameter Description Valid Values
{courseId} LearningStudio Course ID. This API does not support overloads. Numeric ID issued by LearningStudio
{categoryId} LearningStudio Webliography Category 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

For GET and DELETE Requests

None.

For POST and PUT Requests

{
  webliographyCategory:{
    "name":"{webliographyCategoryName}"
  }
}

Property Descriptions

Name Description Valid Values
{webliographyCategoryName} Name of the webliography category. Any string of text

API Response

Response Headers

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

When creating an item, the API will return a status code of 201 - Created with no response body. When updating or deleting an item, the API will return a status code of 204 - No Content with no response body.

Note: When creating a category, the API will return a Location header, providing the location of the new grade object. See this page for more about this header.

Response Body

Format

{
  "webliographyCategories":[
  {
    "id":{webliographyCategoryId},
    "name":"{webliographyCategoryName}"
  }, {
    "id":{webliographyCategoryId},
    "name":"{webliographyCategoryName}"
  }
  ]
}

Property Descriptions

Name Description
{webliographyCategoryId} ID of the webliography category.
{webliographyCategoryName} Name of the webliography category.

Example: Get All Categories

Request

Endpoint

GET /courses/888888/webliographyCategories

Response

Body

{
  "webliographyCategories":[
  {
    "id":190505,
    "name":"General"
  },
  {
    "id":190657,
    "name":"Search Engines"
  },
  {
    "id":190658,
    "name":"Comics"
  },
  {
    "id":190659,
    "name":"Shopping"
  }
  ]
}

Example: Create or Update a Webliography Category

Request

Endpoint for Creating

POST /courses/888888/webliographyCategories

Endpoint for Updating

PUT /courses/888888/webliographyCategories/12345

Body

{
  webliographyCategory:{
    "name":"General"
  }
}

Response - Creating

HTTP Status Code

201 Created

HTTP Headers

Location: http://api.learningstudio.com/courses/888888/webliographyCategories/12345

Response - Updating

HTTP Status Code for Updating

204 No Content
2675 reads
Always Learning
Pearson