Pearson
Always Learning

API Group: 

This API provides the basic information about a LearningStudio user including their user ID, name, username (login id), email address and the client string for the institution where they are enrolled.



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}{.format}
  • Retrieves the user detail object.

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)
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

Query Parameter Name Description Valid Values
source When users are created with the SIS Interoperability options, institutions can include a "sourced ID" that can hold their internal identifier for the student (this helps prevent duplicate users). Normally this detail is not available through LearningStudio's User Interface, APIs, or AdministrationPages. However using this parameter will include that data in these results. true or Blank

Request Body

None

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.

Response Body

Format

{
  "users": [{
    "id": {userId},
    "userName": "{userName}",
    "firstName": "{firstName}",
    "lastName": "{lastName}",
    "emailAddress": "{emailAddress}",
    "clientString": "{clientString}"
    "sourcedIDs": [{
      {sourcedID.Name}_{sourcedID.Value}"
    }]
  }]
}

Property Descriptions

Name Description
{userId} LearningStudio user ID.
{userName} Institution-defined username (or "login id") for the user. This value can be used with user overloads.
{firstName} First name of user.
{lastName} Last name of user.
{emailAddress} Email address of the user.
{clientString} Institution's client string - the primary identifier for the institution in the APIs. This value is primarily used in the Terms API and for user overloads.
{sourcedID.Name} The institution's name as assigned by LearningStudio, used here as a prefix for the actual sourced id value. Note, this property is only included if the source query string parameter is used (see above).
{sourcedID.Value} The Sourced ID for the user assigned by the institution. Note, this property is only included if the source query string parameter is used (see above).

Example: Get User

Request

Endpoint with User ID

GET /users/123456

Endpoint with User Login ID Overload

GET /users/loginid=publicu%7Cjsmith

Response

Body

{
  "users": [{
    "id": 654321,
    "userName": "jsmith",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "jsmith@publicu.edu",
    "clientString": "publicu"
  }]
}

Example: Get User By /me Overload

Request

Endpoint

GET /

Response

Body

{
  "me": {
    "id": 654321,
    "userName": "jsmith",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "jsmith@publicu.edu",
    "clientString": "publicu"
  }
}

Example: Get User Sourced ID

Request

Endpoint

GET /users/123456?source=true

Response

Body

{
  "users": [{
    "id": 654321,
    "userName": "jsmith",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "jsmith@publicu.edu",
    "clientString": "publicu",
    "sourcedIDs": [
        "gbestc_123456"
    ]
  }]
}
2773 reads
Always Learning
Pearson