ClearCompany LMS REST API Guide

Follow

This document describes how to use the LMS REST API and is intended for developers who are familiar with software development and RESTful web services. It describes the methods of the service, parameters, and provides response examples.

Attention
This document contains advanced technical information. We recommend involving your IT team for proper guidance.

In this article:

Introduction
DevCenter Web Portal
Support
Service Specifications
Signup and Licensing
Authentication Methods
LMS REST API Methods
Users
Groups
Roles
Learning Objects
User Object Records
Forms (Quizzes and Surveys)
Assignments
Launch Learning Objects
Tags
Bookmarks
Authors

Introduction

ClearCompany Learning is an award-winning Learning Management System (LMS) that provides a high level of flexibility and customization. The front end is powered by ClearCompany’s proprietary LMS REST API and Elan Database Engine.

With the LMS REST API add-on product, you can leverage your ClearCompany Learning data for solving business application and integration needs. Your developers can create web services to programmatically push and pull data through the ClearCompany Learning database in real-time, including:

  • User Data
  • Group Data
  • Learning Object Data
  • Assignment Data
  • Completion Data

There is also support for performing basic tasks such as adding and updating users and groups in ClearCompany Learning, and completion records.

ClearCompany Learning requires TLS 1.2 for all connections to the API.

DevCenter Web Portal

A web-based version of this documentation with additional full code examples for different programming languages is available at our DevCenter Portal here: https://devcenter.brainier.com

Contact support@clearcompany.com for DevCenter credentials.

Note
A technical walkthrough of constructing the specific authentication for each API call is here: https://devcenter.brainier.com/elan-api/authentication/

You will find full source-code examples for working authentication in a couple of different programming languages to help get you started.

Support

For developer support, email support@clearcompany.com. Please make sure to include the full details of the API call you’re having trouble with, including your full headers, the endpoint you’re trying to hit, and the response.

ClearCompany recommends using a free Postman account (https://www.postman.com/postman-account/) to test your LMS REST API authentication, and simply share your Postman workspace if you need support.

Service Specifications

Protocol: Representational State Transfer (REST)
SSL Support: TLS 1.2 required

Signup and Licensing

Signup Requirements: Web Services Customer Key and Company ID
Account Required: ClearCompany Learning web user or ClearCompany Learning admin with API keys

Authentication Methods

The LMS REST API provides two methods for authenticating API requests. The methods provided are as follows:

  • HMAC — A secure and robust method of encryption that ensures your application is protected from unwanted access.
  • OAuth 2.0 — An industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for application integration.
Option 1 – HMAC Authentication

Prerequisites

  1. Log in to your ClearCompany LMS instance and obtain your API credentials.
  2. Your Company ID and Customer Key are located under:
    LMS > Admin > Settings > Options > Integrations > “LMS REST API”
  3. Credentials can be generated or refreshed by pressing the Generate Credentials button.

Overview

All calls made to the LMS REST API must include an authentication header to prevent unauthorized data access. This header contains information relating to where the call is coming from as well as an encrypted digest. The digest is constructed using the HMAC-SHA256 algorithm.

A date header and client IP address header are also necessary to provide an additional layer of security.

Example Request

GET https://customer.brainier.com/rest/brainier/user/5 HTTP/1.1
Host: customer.brainier.com
Authentication: hmac johndoe:[MWM3MmM1YWM4YTJhYTRhNzM0NTVlNGJjNTczOWUwM2EzMzgyNGQzYWIyOWI4MDAzZGZlMjhlYzMxOTRiOGEyYg==] 1950026549841651
Elan-Date: 1970-01-31 14:00:00
API-Client-IP: 123.45.678.90

(Replace customer.brainier.com with your ClearCompany Learning subdomain.)

Required Headers

Header Description
Authentication String used to authenticate API requests. See Building the Authentication Header.
Elan-Date Current date/time of the call in UTC, format YYYY-MM-DD HH:mm:ss.
API-Client-IP IP address of the end user making the call to the integrating application.

 

Building the Authentication Header

Authentication: 

<protocol> <username>:[<digest>] <companyId>
Variable Description
protocol This specifies the authentication protocol, "hmac".
username This is the LMS username of the person making the API call. It serves as a unique identifier that is used to determine the user's access rights.
digest This alphanumeric string is the secure digest created via the HMAC-SHA256 algorithm. See the next section for details on how to create the digest.
companyId This is the "company id" and it identifies the company making the call. It is generated in the admin section of ClearCompany Learning along with the "customer key".

Creating the Secure Digest

Start by creating a string in the following format:

<method>+<path>+<datetime>+<username>
Variable Description
method This is the HTTP method being used for the API call, such as GET, PUT, or POST.
path This is the REST path being used for the API call. Do not include any query parameters in this string — only path parameters. Make sure not to include a trailing slash at the end of the path.
datetime The same UTC datetime value from the "Elan-Date" header (minus the spaces and dashes).
username This is the LMS username of the person making the API call. It serves as a unique identifier that is used to determine the user's access rights.

Example string:

GET+/rest/brainier/user/5+1970013114:00:00+johndoe

Hash the string with HMAC-SHA256 using your API Customer Key, output uppercase hexadecimal, then Base64-encode the result:

base64encode(hmac("sha256", "customer key", "GET+/rest/brainier/user/5+1970013114:00:00+johndoe"))

 

Option 2 – OAuth 2.0 Authorization

Create an API Client

Navigation Path:
LMS > Admin > Settings > Options > Integrations > LMS REST API > Manage API Clients

Fields

  • Client Name: Name for this API client
  • Token Duration (minutes): Validity period for access tokens (max 1440)
  • Scopes: Groups of API methods the client can access
     

After saving, the following are displayed:

  • Client ID: Unique identifier for this API client
  • Client Secret: Secret used with Client ID to obtain tokens (store securely; never expose to front end)

 

Generating an Access Token

Example Request:

POST https://customer.brainier.com/rest/brainier/oauth/token

Headers:

Content-Type: application/x-www-form-urlencoded

(Replace customer.brainier.com with your ClearCompany Learning subdomain.)

Body Parameters:

Parameter  Location  Description 
grant_type  Request Body  Required – Must be "client_credentials". 
client_id  Request Body  Required – The Client ID associated with your API client. 
client_secret  Request Body  Required – The Client Secret associated with your API client. 
username  Request Body  Optional – The LMS username of an account to bind the access token to. If no username is supplied, the token will be bound to the default SuperAdmin account (user_id 1). 
Content-Type  Header  Must be "application/x-www-form-urlencoded". 

Sample Response:

{
  "scope": "groups users",
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbG...",
  "expires_in": 3600,
  "token_type": "bearer"
}

Error Definitions

Status Code Error Description
400 400 invalid_client Provided client_id or client_secret are invalid.
400 400 invalid_grant Provided grant_type is invalid; must be client_credentials.
400 400 invalid_username Provided username does not exist (if provided).

 

Using an Access Token

Include the access token in the Authorization header:

GET https://customer.brainier.com/rest/brainier/user/1
Authorization: Bearer <access_token>
API-Client-IP: 123.45.678.90

(Replace customer.brainier.com with your ClearCompany Learning subdomain.)

Required Headers

Header Description
Authorization This header is where the access token must be included. Its value must be of the form: Bearer <access_token>
API-Client-IP IP address of the end user making the call to the integrating application.

LMS REST API Methods

The following section outlines all available REST API endpoints.  Sample Responses shown are examples and fields may vary depending on data and features in your LMS instance.

Users

Get Single User Information

Description:
Returns all user information for a given user ID.

Method: GET

Path: 

/rest/brainier/user/user_id?is_vendor_user_id=is_vendor_user_id

Parameters

Parameter Type Required Description
user_id Integer Yes Unique identifier of the user
is_vendor_user_id Boolean No If true, treats user_id as the vendor ID

Example Request

GET /rest/brainier/user/5 HTTP/1.1
Host: customer.brainier.com

Example Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": {
    "PHONE": "952-345-5555",
    "JOB_TITLE": "Web Developer",
    "USER_ID": 1,
    "VENDOR_USER_ID": 7881,
    "EMAIL": "dnedrud@brainier.com",
    "LAST_NAME": "Nedrud",
    "FIRST_NAME": "Dan",
    "STATUS": "Active",
    "ADDED_ON": "2015-07-30 11:00:50.240",
    "GMT_OFFSET": -6,
    "USERNAME": "dnedrud",
    "MIDDLE_NAME": "",
    "ADDED_BY": "",
    "AUX_SAMPLE_FIELD": "sample_value",
    "LANGUAGE_ID": 1,
    "EXPIRES_ON": "",
    "FORCE_PASSWORD_CHANGE": 1,
    "TAX_PERCENT": 7.9,
    "CURRENCY": "USD",
    "USER_AVATAR": "",
    "PROFILE_VIEWS": 32,
    "DATE_FORMAT": "MM/DD/YYYY",
    "TIME_FORMAT": "12 Hour",
    "PRIMARY_GROUP_ID": 1,
    "PRIMARY_GROUP_NAME": "Top Level",
    "ROLE_ID": 1,
    "ROLE_NAME": "Superadmin"
  }
}
Get Multiple Users Information

Description:
Returns user information for all users matching filter criteria.

Method: GET

Path:


/rest/brainier/user?added_on_greater_than=added_on_greater_than&added_on_less_than=added_on_less_than&group_id=group_id&is_vendor_group_id=is_vendor_group_id&primary_yn=primary_yn&role_id=role_id&gmt_offset=gmt_offset&status=status&username=username&sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters

Parameter Type Required Description
added_on_greater_than DateTime No Returns users added after this date (UTC)
added_on_less_than DateTime No Returns users added before this date
group_id Integer No Filters by group ID
is_vendor_group_id Boolean No If true, treats group_id as vendor ID
primary_yn Integer No 1 = primary group only
role_id Integer No Filter by role
status String No Active or Inactive
username String No Partial match for username
sort_column String No Field name to sort by
sort_order String No ASC or DESC
start_row Integer No Start of range
end_row Integer No End of range

Example Response:
Returns an array of user objects identical in structure to the single-user response.

Update User Information

Description:
Updates an existing user. 

Note: If applicable, assignment changes may take up to an hour to propagate.

Method: PUT

Path:
/rest/brainier/user/user_id?is_vendor_user_id=is_vendor_user_id&create_if_missing=create_if_missing

Request Body (JSON)

{
  "password":"password", 
  "force_password_change":"force_password_change", 
  "first_name":"first_name", 
  "middle_name":"middle_name", 
  "last_name":"last_name", 
  "email":"email", 
  "phone":"phone", 
  "job_title":"job_title", 
  "language_id":"language_id", 
  "gmt_offset":"gmt_offset",
  "username":"username",
  "status":"status",
  "currency":"currency",
  "tax_percent":"tax_percent",
  "vendor_user_id":"vendor_user_id", 
  "primary_group_id":"primary_group_id", 
  "is_vendor_group_id":"is_vendor_group_id", 
  "role_id":"role_id",
  "aux_{sample_aux_field}":"sample_aux_field_value"
}

Parameters (JSON Unless noted otherwise)

Parameter Type Required Description
user_id (Path parameter) Integer Yes Unique identifier of the user.
is_vendor_user_id (URL parameter) Boolean No Indicates whether the user ID passed is the alternate “vendor” user ID rather than the default Elan ID.
create_if_missing (URL parameter) Boolean No If this value is passed as “true” and no user is found with a matching user ID, a new user will be created with the included parameters.
password String No User password.
force_password_change Bit No Indicates whether the user will be forced to reset their password on next login.
first_name String No First name of user (limit 100 characters).
middle_name String No Middle name of user (limit 100 characters).
last_name String No Last name of user (limit 100 characters).
email String No Email of user (limit 200 characters).
phone String No Phone number of user (limit 100 characters).
job_title String No Job title of user (limit 100 characters).
language_id Integer No

Language ID for user. Options: 

1=English, 2=French, 3=French Canadian, 4=Spanish, 5=German, 6=Chinese, 7=Italian, 8=Portuguese, 9=Swedish, 10=English UK, 11=Chinese (Traditional), 12=Japanese, 13=Korean, 14=Arabic, 15=Vietnamese.

expires_on DateTime No Expiration date for the user (yyyy-MM-dd HH:mm:ss).
gmt_offset Integer No GMT offset for user (e.g., -6 for Central Time, 2 for Athens/Bucharest/Istanbul).
username Integer No (Required if creating user) Username used for user login. Must be unique.
status String No Indicates status of user. Options: Active, Inactive.
currency String No User’s currency for ecommerce transactions. Options: USD, CAD.
tax_percent Float No User’s tax rate for ecommerce transactions.
vendor_user_id String No Additional identity column for customer use (limit 100 characters).
primary_group_id Integer No (Required if creating user) Unique identifier of the user’s primary group. Must be supplied along with role_id.
is_vendor_group_id Boolean No Indicates whether the group ID passed is the alternate “vendor” group ID rather than the default Elan ID.
role_id Integer No (Required if creating user) Indicates the role the user will take within the specified group. Must be supplied with primary_group_id.
aux_{sample_aux_field} String No User-defined key/value pair field. The key is the name of a user aux field prepended with “aux_”, while the value is the desired aux field value. Multiple key/value pairs may be included as needed. Both should be URL encoded.

Success Response

{
  "SUCCESS": true,
  "MESSAGE": "User information updated successfully",
  "DATA": {
    "user_id": 56
  }
}
Create User

Description:
Creates a new user.

Method: POST

Path: 

/rest/brainier/user

Request Body (JSON)

{
  "password":"password", 
  "force_password_change":"force_password_change", 
  "first_name":"first_name", 
  "middle_name":"middle_name", 
  "last_name":"last_name", 
  "email":"email", 
  "phone":"phone", 
  "job_title":"job_title", 
  "language_id":"language_id", 
  "gmt_offset":"gmt_offset",
  "username":"username",
  "status":"status",
  "currency":"currency",
  "tax_percent":"tax_percent",
  "vendor_user_id":"vendor_user_id", 
  "primary_group_id":"primary_group_id", 
  "is_vendor_group_id":"is_vendor_group_id", 
  "role_id":"role_id",
  "aux_{sample_aux_field}":"sample_aux_field_value"
}

Parameters (JSON)

Parameter Type Required Description
password String Yes User password.
force_password_change Bit Yes Indicates whether the user will be forced to reset their password on next login.
first_name String Yes First name of user (limit 100 characters).
middle_name String No Middle name of user (limit 100 characters).
last_name String Yes Last name of user (limit 100 characters).
email String No Email of user (limit 200 characters).
phone String No Phone number of user (limit 100 characters).
job_title String No Job title of user (limit 100 characters).
language_id Integer Yes

Language ID for user. Options: 

1=English, 2=French, 3=French Canadian, 4=Spanish, 5=German, 6=Chinese, 7=Italian, 8=Portuguese, 9=Swedish, 10=English UK, 11=Chinese (Traditional), 12=Japanese, 13=Korean, 14=Arabic, 15=Vietnamese.

gmt_offset Integer No GMT offset for user (e.g., -6 for Central Time, 2 for Athens/Bucharest/Istanbul).
username String Yes Username used for user login; must be unique.
status String Yes Indicates status of user. Options: Active, Inactive.
currency String No User's currency for ecommerce transactions. Options: USD, CAD.
tax_percent Float No User’s tax rate for ecommerce transactions.
vendor_user_id String No Optional identity column for customer use (limit 100 characters).
primary_group_id Integer Yes Unique identifier of the user's primary group.
is_vendor_group_id Boolean No Indicates if group ID is the alternate vendor group ID.
expires_on DateTime No Expiration date for the user (yyyy-MM-dd HH:mm:ss).
role_id Integer Yes Indicates the role the user will take within the specified group.
aux_{sample_aux_field} String No User-defined auxiliary field; key/value pair with “aux_” prefix. Multiple fields may be included.

Example Success Response

{
  "SUCCESS": true,
  "MESSAGE": "User created successfully",
  "DATA": {
    "user_id": 56
  }
}
Upload User Avatar

Description:
Uploads an image file as a user avatar.

Method: POST

Path: 

/rest/file/avatar/user_id

Body:
Binary image file

Parameters

Parameter Type Required Description
user_id (Path parameter) Integer Yes Target user ID
HTTP Request Body Binary Yes Binary file data

Success Response

{
  "SUCCESS": true,
  "MESSAGE": "Upload Successful",
  "DATA": "https://cdn.brainier.com/.../avatars/.../filename.png"
}

Groups

Get Single Group Information

Description:

This returns a JSON object of all the group information for a given group_id.

Method: GET

Path: 

/rest/brainier/group/group_id

Parameters

Parameter Type Required Description
group_id (Path parameter) Integer Yes Group identifier
is_vendor_group_id Boolean No Treat as vendor ID

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: {
    GROUP_NAME: "Brainier Top Level Group",
    GROUP_ID: 1,
    VENDOR_GROUP_ID: 40,
    GROUP_TYPE_ID: 1,
    GROUP_STATUS: "Active",
    CREATION_DATE: "2015-11-23 21:23:34.820",
    PARENT_GROUP_ID: "",
    PARENT_ID_LIST: "",
    GROUP_CODE: "G1",
    GROUP_DESCRIPTION: "Top level group for ClearCompany Learning."
  }
}

Note: This is a comma separated list of ids i.e."greatgrandparent_id, grandparent_id, parent_id"
Get Multiple Groups Information

Description:

This returns a JSON object of all the group information for groups that meet filter criteria.

Method: GET

Path:
/rest/brainier/group?group_type_id=group_type_id&status=status&group_code=group_code&user_id=user_id&sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters (URL)

Parameter Type Required Description
group_type_id Integer No Identifies the type of group to return. Options: 1=Company, 2=Department, 3=Location. Can also create a group type in Brainier and pass in the auto-generated group ID.
status String No Indicates status of group. Options: Active, Inactive.
group_code String No Alternate identifier for a group.
user_id Integer No Unique identifier of a user. If passed, only returns groups the user is a part of.
is_vendor_user_id Boolean No Indicates whether the user ID passed is the alternate “vendor” user ID rather than the default Elan ID.
sort_column String No Name of column that results will be sorted by. Most columns from example response can be used here.
sort_order String No Order of sort column. Default order is ascending. Options: ASC, DESC.
start_row Integer No Used for pagination. If defined, limits results to rows greater than or equal to this number.
end_row Integer No Used for pagination. If defined, limits results to rows less than or equal to this number.


Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: [{
    GROUP_NAME: "Brainier Top Level Group",
    GROUP_ID: 1,
    VENDOR_GROUP_ID: 40,
    GROUP_TYPE_ID: 1,
    GROUP_STATUS: "Active",
    CREATION_DATE: "2015-11-23 21:23:34.820",
    PARENT_GROUP_ID: "",
    PARENT_ID_LIST: "",
    Note: This is a comma separated list of ids i.e."greatgrandparent_id, grandparent_id, parent_id"GROUP_CODE: "G1",
    GROUP_DESCRIPTION: "Top level group for ClearCompany Learning.",
    ROLE_ID: 1,
    Note: This field is only included when a user_id parameter is passed.
    ROLE_NAME: "SuperAdmin"Note: This field is only included when a user_id parameter is passed.
  },
  {
    GROUP_NAME: "Human Resources",
    GROUP_ID: 5,
    VENDOR_GROUP_ID: 42,
    GROUP_TYPE_ID: 1,
    GROUP_STATUS: "Active",
    CREATION_DATE: "2016-04-14 17:27:04.250",
    PARENT_GROUP_ID: 2,
    PARENT_ID_LIST: "1,2",
    GROUP_CODE: "HR",
    GROUP_DESCRIPTION: "Group containing users in HR.",
    ROLE_ID: 1,
    Note: This field is only included when a user_id parameter is passed.
    ROLE_NAME: "SuperAdmin" Note: This field is only included when a user_id parameter is passed.
  },
  …]
}
Update Group Information

Description: 

This updates a pre-existing group with new information provided.

Method: PUT

Path:
/rest/brainier/group/group_id?is_vendor_group_id=is_vendor_group_id&create_if_missing=create_if_missing

Body

{
  "group_code": "group_code",
  "group_name": "group_name",
  "group_type_id": "group_type_id",
  "group_description": "group_description",
  "group_status": "group_status",
  "parent_group_id": "parent_group_id",
  "is_vendor_parent_group_id": "is_vendor_parent_group_id",
  "vendor_group_id": "vendor_group_id"
}

Parameters (JSON unless noted otherwise)

Parameter Type Required Description
group_id (Path parameter) Integer Yes Unique identifier of the group.
is_vendor_group_id (URL parameter) Boolean No Indicates whether the group ID passed is the alternate “vendor” group ID rather than the default Elan ID.
create_if_missing (URL parameter) Boolean No If passed as “true” and no group is found with a matching ID, a new group will be created using the included parameters.
group_code String No Alternate identifier for internal Brainier usage. Must be a unique value.
group_name String No Display name of the group (limit 200 characters).
group_type_id Integer No Identifies the type of group to return. Options: 1=Company, 2=Department, 3=Location. Can also create a group type in Brainier and pass in the auto-generated group ID.
group_description String No Optional description of the group (limit 4000 characters).
group_status String No Indicates the status of the group. Options: Active, Inactive.
vendor_group_id String No Optional identity column for customer use (limit 100 characters).
parent_group_id String No (Required if creating group) Group ID of the current group’s parent within the group tree structure. Used only when creating a new group.
is_vendor_parent_group_id Boolean No Indicates whether the parent group ID passed is the alternate “vendor” group ID rather than the default Elan ID.

Success Response

{
  SUCCESS: true,
  MESSAGE: "Group information updated successfully",
  DATA: {
    "group_id": 3
  }
}
Create Group

Description: 

This creates a new group with the information provided.

Method: POST

Path: 

/rest/brainier/group

Body

 {
"group_code":"group_code", 
"group_name":"group_name", 
"group_type_id":"group_type_id", 
"group_description":"group_description", 
"group_status":"group_status", 
"parent_group_id":"parent_group_id", "is_vendor_parent_group_id":"is_vendor_parent_group_id", "vendor_group_id":"vendor_group_id"
}

Parameters (JSON)

Parameter Type Required Description
group_code String Yes Alternate identifier for internal Brainier usage. Must be a unique value.
group_name String Yes Display name of the group. Limit of 200 characters.
group_type_id Integer Yes Identifies the type of group to return. Options: 1=Company, 2=Department, 3=Location. Can also create a group type in Brainier and pass in the auto-generated group ID.
group_description String No Optional description of the group. Limit of 4000 characters.
group_status String Yes Indicates the status of the group. Options: Active, Inactive.
vendor_group_id String No Additional identity column for customer use. Can store any data string useful in identifying the group (limit 100 characters).
parent_group_id Integer Yes The group ID of the current group's parent within the group tree structure. Only used when creating a new group.
is_vendor_parent_group_id Boolean No Indicates whether the parent group ID passed is the alternate “vendor” group ID rather than the default Elan ID.


Success Response

{
  SUCCESS: true,
  MESSAGE: "Group created successfully",
  DATA: {
    "group_id":4
  }
}
Add User to Group

Description:

This adds a single user to the specified group within the context of a role. Note: If applicable, assignment changes may take up to an hour to propagate.

Method: POST

Path: 

/rest/brainier/usergroup/user_id/group_id/role_id

Parameters (Path)

Parameter Type Required Description
user_id Integer Yes Unique identifier of the user.
group_id Integer Yes Unique identifier of the group the user is being added to.
role_id Integer Yes Indicates the role the user will take within the specified group.

Success Response

{
SUCCESS: true,
MESSAGE: "User successfully added to group."
DATA: {
  "user_id":56
  }
}
Remove User from Group

Description:

This removes a single user from a group. Note: If applicable, assignment changes may take up to an hour to propagate.

Method: DELETE

Path: 

/rest/brainier/usergroup/user_id/group_id/

Parameters (Path)

Parameter Type Required Description
user_id Integer Yes Unique identifier of the user.
group_id Integer Yes Unique identifier of the group the user is being added to.

Success Response

{
  SUCCESS: true,
  MESSAGE: "User successfully removed from group."
  DATA: {
    "user_id":56
  }
}

Roles

Get Single Role Information

Description:

This returns a JSON object of all the role information for a given role_id.

Method: GET

Path: 

/rest/brainier/role/role_id

Parameters (Path)

Parameter Type Required Description
role_id Integer Yes Indicates the role the user will take within the specified group.

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: {
    ACTIVE:1,
    ROLE_ID:2,
    OWNER_GROUP_ID:1,
    ROLE_NAME: "Administrator",
    ROLE_CODE: "ADM"
  }
}
Get Multiple Roles Information

Description:

This returns a JSON object of all the role information for roles that meet filter criteria.

Method: GET

Path: 

/rest/brainier/role?role_name=role_name&role_code=role_code

Parameters (URL)

Parameter Type Required Description
role_name String No Name of the role as defined by the customer.
role_code String No Secondary unique identifier of the role.

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: [{
    ACTIVE: 1,
    ROLE_ID: 2,
    OWNER_GROUP_ID: 1,
    ROLE_NAME: "Administrator",
    ROLE_CODE: "ADM"
  },
  {
    ACTIVE: 1,
    ROLE_ID: 3,
    OWNER_GROUP_ID: 1,
    ROLE_NAME: "Manager",
    ROLE_CODE: "MANAGER"
  },
  …]
}

Learning Objects

Get Learning Object Information

Description:
Returns information for a specific learning object.

Method: GET

Path: 

/rest/brainier/object/object_id?parent_object_id=parent_object_id

Parameters (URL unless noted)

Parameter Type Required Description
object_id (path parameter) Integer Yes Unique ID of the object
parent_object_id Integer No Used for nested objects
admin_objects Boolean No Includes admin-only content if true

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: {
    OBJECT_TYPE_ID:21,
    OWNER_GROUP_ID:16,
    CREATOR_USER_ID:5,
    CREATION_TS:"2015-07-30 11:00:50.240",
    OBJECT_TYPE_NAME:"SCORM",
    FACULTY_ID:34,
    OBJECT_ID:4,
    OBJECT_NAME:"Sample SCORM Course",
    OBJECT_DESCR: "Sample description.",
    OBJECT_STATUS:"ACTIVE",
    OBJECT_REL_DATE:"2015-07-30 11:00:50.240",
    OBJECT_EXP_DATE:"2015-07-30 11:00:50.240",
    DURATION:"Six seconds",
    DURATION_SECS:6,
    AVG_RATING:3,
    TAGS:"corporate,March",
    OBJECT_SEARCH_TERMS:"March,SCORM",
    AUX_{SAMPLE_AUX_FIELD}:"sample_aux_field_value",
    AUX_{SAMPLE_AUX_FIELD_2}:"sample_aux_field_2_value",
    LINK_PATH:"https://www.wikipedia.com",
    PASSING_PERCENT:"",
    CHILD_ID_LIST:"76,234,4,55", 
    VIDEO_STEPS:"2,4", Note: These are the identifiers of all the videos attached to a course. They are necessary for the launch video method."
    STEP_NO:"6", Note: Only included if a parent_object_id is passed in, in which case it indicates the position number for sorting."
    OBJECT_IMAGE:"https://cdn.brainier.com/012/objects/345/D5523E6F-FBD5-4636-D9916F54B2384980.png",
    PAGE_VIEWS:11,
    CERTIFICATE_TEMPLATE_ID: ""
  }
}
Get Multiple Learning Objects

Description:
Retrieves learning objects matching filter criteria.

Method: GET

Path:
/rest/brainier/object?created_on_greater_than=created_on_greater_than&created_on_less_than=created_on_less_than&parent_object_id=parent_object_id&group_id=group_id&object_type_id=object_type_id&status=status&tags=tag1%2Ctag2%2Ctag3&aux_fields=%7B%22aux_key1%22%3A%22aux_value1%22%2C%22aux_key2%22%3A%22aux_value2%22%7D&sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters (URL)

Parameter Type Required Description
created_on_greater_than DateTime (yyyy-MM-dd HH:mm:ss) No The object’s creation timestamp must be greater than this value. Must be URL encoded, e.g., "2016-06-13 18:40:39" becomes "2016-06-13%2018%3A40%3A39".
created_on_less_than DateTime (yyyy-MM-dd HH:mm:ss) No The object’s creation timestamp must be less than this value.
parent_object_id String No Limits returned objects to those belonging to the specified parent(s). If nested multiple times, use a pipe-delimited list (e.g., `"greatgrandparent_id
group_id Integer No Unique identifier of the owner group.
object_type_id Integer No Identifies the type of learning object in Brainier. Options: 1=Course, 2=Class, 3=Link, 5=Survey, 6=Quiz, 8=Success Track, 9=Curriculum, 20=Document, 21=SCORM.
status String No Indicates the status of the learning object. Options: Active, Inactive.
tags String No Comma-delimited list of tags added to the learning object by an administrator. Must be URL encoded, e.g., "tag1,tag2,tag3" becomes "tag1%2Ctag2%2Ctag3".
aux_fields String No JSON object containing key/value pairs indicating object aux field names and values. Must be URL encoded, e.g., {"aux_key1":"aux_value1","aux_key2":"aux_value2"} becomes %7B%22aux_key1%22%3A%22aux_value1%22%2C%22aux_key2%22%3A%22aux_value2%22%7D.
sort_column String No Name of the column used for sorting results. Most columns from example responses can be used.
sort_order String No Order of sort column. Default is ascending. Options: ASC, DESC.
start_row Integer No Used for pagination. Limits results to rows greater than or equal to this number.
end_row Integer No Used for pagination. Limits results to rows less than or equal to this number.
admin_objects Boolean No If set to "true", checks user access through the administration side rather than the front-end. Default is "false".


Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: [{
    OBJECT_TYPE_ID: 21,
    OWNER_GROUP_ID: 16,
    CREATOR_USER_ID: 5,
    CREATION_TS: "2015-07-30 11:00:50.240",
    OBJECT_TYPE_NAME: "SCORM",
    FACULTY_ID: 34,
    OBJECT_ID: 4,
    OBJECT_NAME: "Sample SCORM Course",
    OBJECT_DESCR: "Sample description.",
    OBJECT_STATUS: "ACTIVE",
    OBJECT_REL_DATE: "2015-07-30 11:00:50.240",
    OBJECT_EXP_DATE: "2015-07-30 11:00:50.240",
    DURATION: "Six seconds",
    DURATION_SECS: 6,
    AVG_RATING: 3,
    TAGS: "corporate,March",
    OBJECT_SEARCH_TERMS: "March,SCORM",
    AUX_ {
      SAMPLE_AUX_FIELD
    }: "sample_aux_field_value",
    AUX_ {
      SAMPLE_AUX_FIELD_2
    }: "sample_aux_field_2_value",
    LINK_PATH: "https://www.wikipedia.com",
    PASSING_PERCENT: "",
    CHILD_ID_LIST: "76,234,4,55",
    VIDEO_STEPS: "2,4",
    Note: These are the identifiers of all the videos attached to a course.They are necessary
    for the launch video method."
STEP_NO:"6 ", Note: Only included if a parent_object_id is passed in, in which case it indicates the position number for sorting."OBJECT_IMAGE: "https://cdn.brainier.com/012/objects/345/D5523E6F-FBD5-4636-D9916F54B2384980.png",
    PAGE_VIEWS: 11,
    CERTIFICATE_TEMPLATE_ID: ""
  },
  {
    OBJECT_TYPE_ID: 1,
    OWNER_GROUP_ID: 16,
    CREATOR_USER_ID: 5,
    CREATION_TS: "2015-07-30 11:00:50.240",
    OBJECT_TYPE_NAME: "Course",
    FACULTY_ID: 34,
    OBJECT_ID: 12,
    OBJECT_NAME: "Sample Video Course",
    OBJECT_DESCR: "Sample description.",
    OBJECT_STATUS: "ACTIVE",
    OBJECT_REL_DATE: "2015-07-30 11:00:50.240",
    OBJECT_EXP_DATE: "2015-07-30 11:00:50.240",
    DURATION: "Six seconds",
    DURATION_SECS: 6,
    AVG_RATING: 4,
    TAGS: "corporate,March",
    OBJECT_SEARCH_TERMS: "March,SCORM",
    AUX_ {
      SAMPLE_AUX_FIELD
    }: "sample_aux_field_value",
    AUX_ {
      SAMPLE_AUX_FIELD_2
    }: "sample_aux_field_2_value",
    LINK_PATH: "https://www.wikipedia.com",
    PASSING_PERCENT: "",
    CHILD_ID_LIST: "76,234,4,55",
    VIDEO_STEPS: "",
    OBJECT_IMAGE: "",
    PAGE_VIEWS: 458,
    CERTIFICATE_TEMPLATE_ID: 3
  },
  …]
}
Get Class Schedules

Description: 

Returns available class schedules for a given learning object.

Method: GET

Path:
/rest/brainier/schedule/object_id?parent_object_id=parent_object_id&sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters (URL unless noted otherwise)

Parameter Type Required Description
object_id Integer Yes Unique identifier of the learning object (must be a class).
parent_object_id String No If the class object has a parent object, the ID for its parent must be passed. If the object is nested more than once, use a pipe-delimited list (e.g., "greatgrandparent_id”)
sort_column String No Name of the column that results will be sorted by. Most columns from the example response can be used here.
sort_order String No Order of the sort column. Default is ascending. Options: ASC, DESC.
start_row Integer No Used for pagination. Limits results to rows greater than or equal to this number.
end_row Integer No Used for pagination. Limits results to rows less than or equal to this number.

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: [{
    "LOCATION": "Conference Room",
    "FACULTY": "John Smith",
    "OBJECT_ID": 715,
    "ACTIVE": 1,
    "GMT_OFFSET": -6,
    "ENTRY_NO": 1,
    "COMPLETION_CODE": "",
    "MAX_SEATS": "",
    "OBJECT_NAME": "Test Class",
    "END_TS": "2016-04-17 12:00:00.000",
    "ENTRY_DESCR": "",
    "START_TS": "2016-04-17 10:00:00.000",
    "VM_KEY": 1 Note: This indicates whether schedule is tied to a virtual meeting(1 = WebEx, 2 = GoToWebinar, 3 = GoToMeeting),
    "AUX_{SAMPLE_AUX_FIELD}": "sample_aux_field_value",
    "AUX_{SAMPLE_AUX_FIELD_2}": "sample_aux_field_2_value"
  },
  {
    "LOCATION": "",
    "FACULTY": "",
    "OBJECT_ID": 715,
    "ACTIVE": 1,
    "GMT_OFFSET": -6,
    "ENTRY_NO": 2,
    "COMPLETION_CODE": "abc123",
    "MAX_SEATS": "",
    "OBJECT_NAME": "Test Class",
    "END_TS": "2016-05-17 12:00:00.000",
    "ENTRY_DESCR": "",
    "START_TS": "2016-05-17 12:00:00.000",
    "VM_KEY": "",
    "AUX_{SAMPLE_AUX_FIELD}": "sample_aux_field_value",
    "AUX_{SAMPLE_AUX_FIELD_2}": "sample_aux_field_2_value"
  },
  …]
}
Get Learning Object Comments

Description:

Retrieves all comments associated with the specified learning object.

Method: GET

Path: /rest/brainier/comment/object_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique identifier of the learning object (must be a class).

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: [{
    "AVATAR_FILENAME ": " https://cdn.brainier.com/018/avatars/5/sample.png",
    "COMMENT_RATING": 4 "COMMENT_TEXT": ”Great course ! ”,
    "COMMENT_TS ": "2019-11-22 20:57:38.347",
    "USER_ID ": 5,
    "LAST_NAME": “Smith”,
    "FIRST_NAME": "Mary",
    "MAX_SEATS": ""]
  }
Get Object Access

Description: 

Returns access permissions for a learning object, filtered by user or group.

Method: GET

Path: /rest/brainier/objectaccess/object_id?user_id=user_id&group_id=group_id

Parameters (URL unless noted otherwise)

Parameter Type Required Description
Object_id (Path parameter) Integer Yes Unique identifier of the learning object (must be a class).
user_id Integer No Limits the access results returned to only those with the specified user ID.
group_id Integer No Limits the access results returned to only those with the specified group ID.

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: {
    USERS: [{
      "FIRST_NAME": "John",
      "LAST_NAME": "Smith",
      "USER_ID": 1823
    },
    {
      "FIRST_NAME": "Jane",
      "LAST_NAME": "Smith",
      "USER_ID": 849
    }],
    GROUPS: [{
      "GROUP_NAME": "IT Support",
      "GROUP_ID": 178
    }]
  }
}
Create Object Access

Description: 

Grants a user or group access to a learning object.

Method: POST 

Path: /rest/brainier/objectaccess/object_id?user_id=user_id&group_id=group_id

Parameters (URL unless noted otherwise)

Parameter Type Required Description
object_id (Path parameter) Integer Yes Unique identifier of the learning object (must be a class).
user_id Integer No Limits the access results returned to only those with the specified user ID.
group_id Integer No Limits the access results returned to only those with the specified group ID.

Success Response

{
  MESSAGE: "Access successfully added.",
  SUCCESS: true,
}
Remove Object Access

Description:

Removes access for the specified user or group.

Method: DELETE

Path: /rest/brainier/objectaccess/object_id?user_id=user_id&group_id=group_id

Parameters (URL unless noted otherwise)

Parameter Type Required Description
Object_id (Path parameter) Integer Yes Unique identifier of the learning object (must be a class).
user_id Integer No Limits the access results returned to only those with the specified user ID.
group_id Integer No Limits the access results returned to only those with the specified group ID.

Success Response

{
   MESSAGE: "Access successfully removed.",
   SUCCESS: true,
}

User Object Records

Get User Object Records

Description:
Retrieves all user object records that meet filter criteria.

Method: GET

Path:
/rest/brainier/record?started_greater_than=started_greater_than&started_less_than=started_less_than&completed_greater_than=completed_greater_than&completed_less_than=completed_less_than&logged_greater_than=logged_greater_than&logged_less_than=logged_less_than&object_id=object_id&user_id=user_id&record_id=record_id&batch_id=batch_id&parent_object_id=parent_object_id&parent_record_id=parent_record_id&status_list=status_list&sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters (URL)

Parameter Type Required Description
started_greater_than DateTime (yyyy-MM-dd HH:mm:ss) No The record’s start_ts field must be greater than this timestamp. Must be URL encoded, e.g., "2016-06-13 18:40:39" becomes "2016-06-13%2018%3A40%3A39".
started_less_than DateTime (yyyy-MM-dd HH:mm:ss) No The record’s start_ts field must be less than this timestamp.
completed_greater_than DateTime (yyyy-MM-dd HH:mm:ss) No The record’s completed_ts field must be greater than this timestamp.
completed_less_than DateTime (yyyy-MM-dd HH:mm:ss) No The record’s completed_ts field must be less than this timestamp.
logged_greater_than DateTime (yyyy-MM-dd HH:mm:ss) No The record’s logged_ts field must be greater than this timestamp.
logged_less_than DateTime (yyyy-MM-dd HH:mm:ss) No The record’s logged_ts field must be less than this timestamp.
object_id Integer No Unique identifier of a learning object.
user_id Integer No Unique identifier of the user.
record_id Integer No Unique identifier of the user object record.
batch_id Integer No Unique identifier of an assignment batch if the object was started or completed within the context of a batch.
parent_object_id Integer No Narrows down the results to only those objects associated with this parent object.
parent_record_id Integer No Narrows down the results to only those records associated with this parent record.
status_list String No Comma-delimited list of statuses that the record results must possess. Options: Complete, Started, Passed, Failed, Registered, Waiting.
sort_column String No Name of the column by which results will be sorted. Most columns from example responses can be used.
sort_order String No Order of the sort column. Default is ascending. Options: ASC, DESC.
start_row Integer No Used for pagination. Limits results to rows greater than or equal to this number.
end_row Integer No Used for pagination. Limits results to rows less than or equal to this number.

Success Response

{
  MESSAGE: "",
  SUCCESS: true,
  DATA: [{
    RECORD_ID: 3357,
    USER_ID: 5,
    OBJECT_ID: 1,
    OBJECT_NAME: "Example Course",
    PARENT_RECORD_ID: 3355,
    ENTRY_NO: "",
    GRANDFATHER_ID: "",
    START_TS: "2015-07-30 11:00:50.240",
    COMPLETED_TS: "",
    LOGGED_TS: "",
    PASS_YN: "",
    STATUS: "Started",
    BATCH_ID: 70,
    SCORE: "",
    VM_ATTENDEE_ID: "",
    TOTAL_SECS_TRACKED: "",
    VENDOR_AUX_FIELD: "",
    COMMENT_TEXT: "This is a sample comment.",
    USER_FILE: "https://customer.brainier.com/utility/dl-file.cfm?type=user-file&ufid=88",
    ASSESSMENT_ID: ""
  },
  {
    RECORD_ID: 6835,
    USER_ID: 5,
    OBJECT_ID: 1,
    OBJECT_NAME: "Example Course",
    PARENT_RECORD_ID: "",
    ENTRY_NO: "",
    GRANDFATHER_ID: "",
    START_TS: "2016-04-07 11:00:50.240",
    COMPLETED_TS: "2016-04-14 11:00:50.240",
    LOGGED_TS: "2017-04-20 09:15:49.770",
    PASS_YN: "",
    STATUS: "Complete",
    BATCH_ID: 216,
    SCORE: "",
    VM_ATTENDEE_ID: "",
    TOTAL_SECS_TRACKED: "",
    VENDOR_AUX_FIELD: "",
    ASSESSMENT_ID: "450"
  },
  …]
}
Create User Object Record

Description:
Creates a record representing a user’s interaction with a learning object (e.g., enrollment, completion).

Method: POST

Path: /rest/brainier/record

Body:

{
  "user_id": "user_id",
  "object_id": "object_id",
  "parent_object_id": "parent_object_id",
  "entry_no": "entry_no",
  "status": "status",
  "batch_id": "batch_id",
  "score": "score",
  "comment_text": "comment_text ",
  "vendor_aux_field": "vendor_aux_field"
}

Parameters (JSON)

Parameter Type Required Description
user_id Integer Yes Unique identifier of the user.
object_id Integer Yes Unique identifier of the learning object.
parent_object_id String No If the object has a parent object, the ID for its parent must be passed. If nested multiple times, this parameter must be pipe-delimited (e.g., `"greatgrandparent_id
entry_no Integer No If the object is a class, entry_no is the unique identifier of the class schedule; otherwise, it is not passed.
status String Yes Current completion status of the user/object combination. Options: Complete, Started, Passed, Failed, Registered, Waiting.
batch_id Integer No Unique identifier of an assignment batch if the object is completed within the context of a batch.
score Float No Score the user achieved when completing a learning object. Typically used for SCORM and quiz objects; ranges from 0–100.
vendor_aux_field String No Optional “vendor” field that can contain any auxiliary information.
comment_text String No Optional field that can contain any notes to associate with the record.


Success Response

{
  SUCCESS: true,
  MESSAGE: "User object record successfully created.",
  DATA: {
    "record_id": "156",
  }
}
Update User Object Record

Description:
Updates an existing record for a learning object.

Method: PUT

Path: /rest/brainier/record/record_id

Body:

{
  "status": "status",
  "Score": "score",
  "comment_text": "comment_text ",
  "vendor_aux_field": "vendor_aux_field"
}

Parameters (JSON unless noted otherwise)

Parameter Type Required Description
record_id Integer Yes Unique identifier of a single user/object record.
status String Yes Current completion status of the user/object combination. Options: Complete, Started, Passed, Failed, Registered, Waiting.
score Float No Score the user achieved when completing a learning object. Typically used for SCORM and quiz objects, usually ranging from 0–100.
vendor_aux_field String No Optional “vendor” field that can contain any auxiliary information.
comment_text String No Optional field that can contain any notes associated with the record.

Success Response

{
  SUCCESS: true,
  MESSAGE: "User object record successfully updated.",
  DATA: {
    "record_id": "156",
  }
}
Unregister from Class

Description:
Removes a user’s enrollment in a class.

Method: DELETE

Path: /rest/brainier/record/record_id

Parameters (Path)

Parameter Type Required Description
record_id Integer Yes Unique identifier of a single user/object record.

Success Response

{
  SUCCESS: true,
  MESSAGE: "Record deletion successful."
}
Add File to Record

Description:
Uploads a file and associates it with the user object record. The file content is sent in the body of a multipart/form-data request.

Method: POST

Path: /rest/brainier/record/record_id?filename=filename&access=access

Parameters

Parameter Type Required Description
record_id (Path) Integer Yes Unique identifier of a single user/object record.
filename (URL) String Yes Name of the file, e.g., "picture.png".
UPLOADED_FILE (FORM) File Yes Contents of an HTML file input.
access String No Determines who can access the file. Options: backend, private, public (default: backend).

Success Response

{
  SUCCESS: true,
  MESSAGE: "User object record successfully updated.",
  DATA: {
    record_id: "156"
  }
}

Forms (Quizzes and Surveys)

Get Form Questions and Answers

Description:
Gets all questions and possible answers for a quiz or survey that matches the provided object ID.

Method: GET

Path: /rest/brainier/form/object_id?parent_object_id=parent_object_id

Parameters

Parameter Type Required Description
object_id (Path) Integer Yes Unique value of the Brainier learning object.
parent_object_id (URL) String No If the object has a parent object, the ID for its parent must be passed. If the object is nested more than once, this parameter must be a pipe-delimited list (e.g., "greatgrandparent_id”)

Success Response

{
  SUCCESS: true,
  MESSAGE: "",
  DATA: [{
    QUES_NO: 1,
    SORT_NO: 2,
    IMAGE_URL: "",
    QUES_TYPE: "Radio",
    QUES_TEXT: " What color is the sky?",
    ANSWERS: [{
      ANS_NO: 1,
      SORT_NO: 2,
      CORRECT: 0,
      ANSWER_TEXT: "Green.",
      RATIONALE: " This is wrong because..."
    },
    {
      ANS_NO: 2,
      SORT_NO: 1,
      CORRECT: 1,
      ANSWER_TEXT: "Blue.",
      RATIONALE: " This is correct because..."
    },
    {
      ANS_NO: 3,
      SORT_NO: 3,
      CORRECT: 0,
      ANSWER_TEXT: "All of the above.",
      RATIONALE: ""
    }]
  },
  {
    QUES_NO: 2,
    SORT_NO: 1,
    IMAGE_URL: "",
    QUES_TYPE: "Textarea",
    QUES_TEXT: " Please describe a perfect sunset.",
    ANSWERS: []
  },
  …]
}
Get Form Options

Description:
Gets additional information pertaining only to quizzes and surveys that is set on the Brainier backend.

Method: GET

Path: /rest/brainier/formoptions/object_id?parent_object_id=parent_object_id

Parameters

Parameter Type Required Description
object_id (Path) Integer Yes Unique value of the Brainier learning object.
parent_object_id (URL) String No If the object has a parent object, the ID for its parent must be passed. If the object is nested more than once, this parameter must be a pipe-delimited list (e.g., "greatgrandparent_id”)

Success Response

{
  SUCCESS: true,
  MESSAGE: "",
  DATA: {
    "QUESTIONS_TO_SHOW": "",
    "RANDOMIZE_QUESTIONS": 0,
    "FINISH_TEXT": "Thank you",
    "PASSING_PERCENT": 70,
    "INTRO_TEXT": "Hello",
    "MAX_RETAKES": 3,
    "USER_CAN_REVIEW": 1
  }
}
Get User Form Answers

Description:

Gets the answers provided by the indicated user for all the questions in the quiz or survey for a single user object record.

Method: GET

Path: /rest/brainier/formanswers/object_id/user_id/record_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique value of the Brainier learning object.
user_id Integer Yes Unique identifier of the user.
record_id Integer Yes Unique identifier of a single user/object record.

Success Response

{
  SUCCESS: true,
  MESSAGE: "",
  DATA: [{
    RECORD_ID: 55,
    QUES_NO: 1,
    USER_ANS_NO: 2
  },
  {
    RECORD_ID: 55,
    QUES_NO: 2,
    USER_ANS_TEXT: " When the sun goes down."
  },
  …]
}
Send Form Answers

Description:

Accepts the answers provided by a particular user for all (or some of) the questions in a quiz or survey. Only one of the "user_ans" fields should contain a value depending on the expected answer format.

Method: POST

Path: /rest/brainier/formanswers/record_id

Body:

[{
  "ques_no": "ques_no",
  "user_ans_no": "user_ans_no",
  "user_ans_list": "user_ans_list",
  "user_ans_text": "user_ans_text",
  "user_ans_textarea": "user_ans_textarea"
},
{
  "ques_no": "ques_no",
  "user_ans_no": "user_ans_no",
  "user_ans_list": "user_ans_list",
  "user_ans_text": "user_ans_text",
  "user_ans_textarea": "user_ans_textarea"
},
…]

Parameters (JSON unless noted otherwise)

Parameter Type Required Description
record_id (Path) Integer Yes Unique identifier of a single user/object record.
ques_no Integer Yes Unique identifier of the question within the quiz or survey object.
user_ans_no Integer No Indicates which option the user selected when the question is of type “Radio” or “Select.”
user_ans_list String No Indicates which options the user selected when the question is of type “Checkbox.” Limit of 50 characters.
user_ans_text String No Indicates which answer the user provided when the question is of type “Text.” Limit of 1000 characters.
user_ans_textarea String No Indicates which answer the user provided when the question is of type “Textarea.” No character limit.

Success Response

{
  SUCCESS: true,
  MESSAGE: "User form answers successfully submitted."
}

Assignments

Get Assignments

Description:
Retrieves all assignment batches that the caller has access to.

Method: GET

Path: /rest/brainier/batches?sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters (URL)

Parameter Type Required Description
sort_column String No Name of the column that results will be sorted by. Most columns from example responses can be used.
sort_order String No Order of sort column. Default is ascending. Options: ASC, DESC.
start_row Integer No Used for pagination. Limits results to rows greater than or equal to this number.
end_row Integer No Used for pagination. Limits results to rows less than or equal to this number.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [{
    "BATCH_ID": 20,
    "BATCH_NAME": "Temp Batch 20",
    "BATCH_CREATION_DATE": "2015-07-30 11:00:50.240",
    "ASSIGNED_BY": 5,
    "BATCH_STATUS": "Active",
    "DAYS_DUE": 31,
    Note: Only included if due date is a“dynamic”due date.
    "DUE_DATE": ""Note: Only included if due date is a“static”due date.
  },
  {
    "BATCH_ID": 21,
    "BATCH_NAME": "Temp Batch 21",
    "BATCH_CREATION_DATE": "2015-07-31 11:00:50.240",
    "ASSIGNED_BY": 5,
    "BATCH_STATUS": "Active",
    "DAYS_DUE": "",
    "DUE_DATE": "2015-08-15 00:00:00"
  }]
}
Create Assignment

Description:
Creates an empty assignment batch. Can also be used to create a bookmark or recommendation.

Method: POST

Path: /rest/brainier/batches

Body

{
  "name": "name",
  "type": "type"
}

Parameters (JSON)

Parameter Type Required Description
name String No Name of the assignment batch.
type String No Type of batch created. Default is assignment. Options: assignment, bookmark, recommendation.

Success Response

{
  "SUCCESS": true,
  "DATA": { "BATCH_ID": 1075 }
}
Get Assigned Users

Description:
Retrieves all user IDs that are part of an assignment batch, either individually or through a group.

Method: GET

Path: /rest/brainier/batchusers/batch_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [2, 32, 47, 6]
}
Create Assigned User

Description:
Adds a user to an assignment batch (or recommendation or bookmark).

Method: POST

Path: /rest/brainier/batchusers/batch_id/user_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.
user_id Integer Yes Unique identifier of the user.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true
}
Remove Assigned User

Description:
Removes a user from an assignment batch (or recommendation or bookmark).

Method: DELETE

Path: /rest/brainier/batchusers/batch_id/user_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.
user_id Integer Yes Unique identifier of the user.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true
}
Get Assigned Groups

Description:

Retrieves all group IDs that are part of an assignment batch.

Method: GET

Path: /rest/brainier/batchgroups/batch_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [2, 32, 47, 6]
}
Create Assigned Group

Description:
Adds a group to an assignment batch (or recommendation or bookmark).

Method: POST

Path: /rest/brainier/batchgroups/batch_id/group_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.
group_id Integer Yes Unique identifier of the group.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true
}
Remove Assigned Group

Description:
Removes a group from an assignment batch (or recommendation or bookmark).

Method: DELETE

Path: /rest/brainier/batchgroups/batch_id/group_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.
group_id Integer Yes Unique identifier of the group.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true
}
Get Assigned Objects

Description:
Retrieves all learning-object IDs that are part of an assignment batch.

Method: GET

Path: /rest/brainier/batchobjects/batch_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [2, 32, 47, 6]
}
Create Assigned Object

Description:
Adds a learning object to an assignment batch (or recommendation or bookmark).

Method: POST

Path: /rest/brainier/batchobjects/batch_id/object_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.
object_id Integer Yes Unique identifier of the object.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true
}
Remove Assigned Object

Description:
Removes a learning object from an assignment batch (or recommendation or bookmark).

Method: DELETE

Path: /rest/brainier/batchobjects/batch_id/object_id

Parameters (Path)

Parameter Type Required Description
batch_id Integer Yes Unique identifier of the assignment batch.
object_id Integer Yes Unique identifier of the object.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true
}
Get Assignments by User

Description:
Retrieves all assigned objects and assignment details for a specified user.

Method: GET

Path: /rest/brainier/mytraining/assigned?user_id=user_id&object_id=object_id&batch_id=batch_id

Parameters (URL)

Parameter Type Required Description
user_id Integer Yes Unique identifier of the user.
object_id Integer No Unique identifier of an object.
batch_id Integer No Unique identifier of an assignment batch.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [
    {
      "AUTHOR_USER_ID": "",
      "USER_ID": 21,
      "OBJECT_DESCR": "This course is an overview of compliance basics.",
      "BATCH_ID": 11771,
      "ASSIGNED_BY": 16,
      "STATUS": "Not Started",
      "OBJECT_ID": 224,
      "AUTHOR_FACULTY_ID": "",
      "RECORD_ID": "",
      "DUE_DATE": "",
      "ASSIGNED_BY_FIRST_NAME": "Dave",
      "OBJECT_TYPE_ID": 21,
      "OBJECT_TYPE_NAME": "SCORM",
      "OBJECT_ASSIGNED_TS": "2017-10-17 16:23:27.02",
      "AVATAR_FILENAME": "https://cdn.brainier.com/012/avatars/5/237DFS7-47D7-B8D-F0A390529AEBBD23.png",
      "ASSIGNED_BY_LAST_NAME": "Smith",
      "ASSIGNED_BY_FULL_NAME": "Dave Smith",
      "OBJECT_NAME": "Compliance - Episode 8",
      "AUTHOR_FULL_NAME": "",
      "DURATION": "60:00",
      "BATCH_NAME": "TEMP BATCH: 09/28/17 08:47 PM",
      "AVG_RATING": 5
    }
  ]
}

Launch Learning Objects

Open SCORM Course

Description:
Returns the URL that launches a SCORM course. A user-object record must be created beforehand. When the user completes the SCORM course, the record is automatically marked as “Complete.” However, a separate API call must still be made to update the user-object record to “Complete” to maintain proper functionality.

Method: GET

Path: /rest/brainier/launchscorm/object_id/record_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique value of the Brainier learning object. Must be of type “SCORM.”
record_id Integer Yes Unique identifier of the user-object record created before SCORM launch. Record should have a status of “Started.”

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": {
    "LAUNCH_URL": "https://customer.brainier.com/ElanEngine/defaultui/launch.jsp?registration=2nFoC8zMDsLsUop-PwJB6AlS6kqQL3ez-xinfLnHkfpjaizMqkQDpw&configuration=ZdRVE_Wd0fQ"
  }
}
Get Document

Description:
Returns information about a document learning object, including the file name, MIME type, and Base64-encoded binary data that can be reconstructed client-side.

Method: GET

Path: /rest/brainier/getdoc/object_id/record_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique value of the Brainier learning object. Must be of type “Document.”
record_id Integer Yes Unique identifier of the user-object record created before calling this method.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": {
    "FILE_NAME": "sample.png",
    "MIME_TYPE": "image/png",
    "BINARY": "iVBORw0KGgoAAAANSUhEUgAAAlgAAAHYCAIAAAAeXAHO..."
  }
}
Open Course Video

Description:
Returns information about a video attached to a Brainier course object, including URLs to the video in multiple formats. The returned structure matches the format of LimeLight’s API, which hosts Brainier videos.

Method: GET

Path: /rest/brainier/launchvideo/object_id/step_no?parent_object_id=parent_object_id

Parameters (Path, unless noted otherwise)

Parameter Type Required Description
object_id Integer Yes Unique value of the Brainier learning object. Must be of type “Course.”
step_no Integer Yes Unique identifier of the video attached to the course, as returned in the “video_steps” field.
parent_object_id (URL) String No If the object has a parent, its ID must be passed. For multi-level nesting, use a pipe-delimited list (e.g., "greatgrandparent_id”)

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": {
    "MEDIA_INFO": {
      "thumbnails": [
        {
          "width": 120,
          "height": 90,
          "url": "https://img.delvenetworks.com/_7IdaBa/lRopqN/sample.jpeg"
        }
      ],
      "media_id": "a23a8kjsadf9853709d2de031e9",
      "description": null,
      "media_type": "Video",
      "title": "1168-1",
      "publish_date": 1343857365,
      "duration_in_milliseconds": 253280,
      "encodings": [
        {
          "width": 480,
          "height": 360,
          "container_type": "Mpegts",
          "size_in_bytes": 33116160,
          "master_playlist_url": "https://s2.cpl.delvenetworks.com/media/e235evb09d2de03d1e9/1168-1aba3c4dfce5e8982e6f71664d/ssd05.m3u8",
          "video_bitrate": 1200,
          "group": null,
          "video_codec": "H264",
          "audio_bitrate": 96,
          "audio_codec": "Aac",
          "primary_use": "HttpLiveStreaming"
        },
        {
          "width": 192,
          "height": 144,
          "url": "rtsp://s2.cml.delvenetworks.com//1/media/ffb21e4816a24eb9bc5140d2cljb32db/951a29a8ddsdvfc42f5b50609/2268-1.3gp",
          "container_type": "ThreeGp",
          "size_in_bytes": 6644355,
          "video_bitrate": 128,
          "audio_bitrate": 64,
          "audio_codec": "Aac",
          "primary_use": "Mobile3gp"
        }
      ]
    }
  }
}

Tags

Get Tags

Description:
Retrieves all system tags accessible to the caller, or all tags associated with objects the user can access.

Method: GET

Path:

/rest/brainier/tags?user_id=user_id&sort_column=sort_column&sort_order=sort_order&start_row=start_row&end_row=end_row

Parameters (URL)

Parameter Type Required Description
user_id Integer No If provided, limits the tag list to those associated with learning objects the user can access.
sort_column String No Name of the column that results will be sorted by. Most columns from example responses can be used.
sort_order String No Order of the sort column. Default is ascending. Options: ASC, DESC.
start_row Integer No Used for pagination. Limits results to rows greater than or equal to this number.
end_row Integer No Used for pagination. Limits results to rows less than or equal to this number.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [
    {
      "OWNER_GROUP_ID": 1,
      "TAG_ID": 2,
      "TAG_TYPE": "Subject",
      "TAG_NAME": "Business"
    },
    {
      "OWNER_GROUP_ID": 1,
      "TAG_ID": 3,
      "TAG_TYPE": "Subject",
      "TAG_NAME": "Business Strategy"
    }
  ]
}

Bookmarks

Get Bookmarked Objects

Description:
Retrieves all learning objects that the caller has created a bookmark for.

Method: GET

Path: /rest/brainier/bookmark

Parameters: This endpoint has no parameters.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [
    {
      "AUTHOR_USER_ID": 1371,
      "AVG_RATING": "",
      "OBJECT_TYPE_ID": 20,
      "IS_EXTERN": 0,
      "OBJECT_TYPE_NAME": "Document",
      "ICON_FILE_PATH": "https://cdn.brainier.com/_version/_img/icons/sample.png",
      "OBJECT_ASSIGNED_TS": "February, 01 2018 18:31:21",
      "URL": "",
      "AUTHOR_LAST_NAME": "Johnson",
      "OBJECT_ID": 654,
      "AUTHOR_FIRST_NAME": "Andy",
      "OBJECT_NAME": "Sample Document",
      "AUTHOR_FACULTY_ID": "",
      "AUTHOR_FULL_NAME": "Andy Johnson"
    }
  ]
}
Create Bookmark

Description:
Creates a bookmark for the specified object for the user making the API call.

Method: POST

Path: /rest/brainier/bookmark/object_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique identifier of the object to bookmark.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": {}
}
Remove Bookmark

Description:
Removes an existing bookmark for a specified object.

Method: DELETE

Path: 

/rest/brainier/bookmark/object_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique identifier of the object whose bookmark should be removed.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": {}
}

Authors

Get Object Authors

Description:
Retrieves all authors associated with a specific learning object.

Method: GET

Path: 

/rest/brainier/author/object_id

Parameters (Path)

Parameter Type Required Description
object_id Integer Yes Unique identifier of the learning object.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [
    {
      "BIOGRAPHY": "One of America's leading authorities on the development of human potential and personal effectiveness...",
      "AVG_RATING": 4,
      "OBJECT_TYPE_ID": 1,
      "WEB_SITE": "",
      "OBJECT_TYPE_NAME": "Course",
      "ORGANIZATION_NAME": "",
      "USER_ID": "",
      "EMAIL": "jsmith@example.com",
      "ICON_FILE_PATH": "https://cdn.brainier.com/_version/_img/icons/sample.png",
      "LAST_NAME": "Smith",
      "DISPLAY_TITLE": "Faculty",
      "FIRST_NAME": "John",
      "AVATAR_FILENAME": "",
      "OBJECT_ID": 1,
      "OBJECT_NAME": "The Secrets of Success",
      "AUTHOR_NO": 1,
      "FACULTY_ID": 1,
      "SORT_NO": 1,
      "DURATION": "00:24:01"
    }
  ]
}
Get All Object Authors

Description:
Retrieves all authors the caller has access to, provided each author is associated with at least one learning object the caller can access.

Method: GET

Path: 

/rest/brainier/author

Parameters:
This endpoint has no parameters.

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [
    {
      "BIOGRAPHY": "One of America's leading authorities on the development of human potential and personal effectiveness...",
      "WEB_SITE": "",
      "ORGANIZATION_NAME": "",
      "FACULTY_ID": 1,
      "USER_ID": "",
      "AUTHOR_NAME": "John Smith",
      "EMAIL": "jsmith@example.com",
      "LAST_NAME": "Smith",
      "FIRST_NAME": "John"
    },
    {
      "BIOGRAPHY": "",
      "WEB_SITE": "https://www.example.com",
      "ORGANIZATION_NAME": "",
      "FACULTY_ID": "",
      "USER_ID": 5,
      "AUTHOR_NAME": "Mary Smith",
      "EMAIL": "",
      "LAST_NAME": "Smith",
      "FIRST_NAME": "Mary"
    }
  ]
}
Get Objects by Author

Description:
Retrieves all learning objects that have the specified user or faculty listed as an author.

Method: GET

Path: 

/rest/brainier/author/author_id?is_faculty=is_faculty

Parameters (Mixed types – predominantly Path, unless noted otherwise)

Parameter Type Required Description
author_id Integer Yes Unique identifier of the author. Either a user_id or faculty_id, depending on the is_faculty parameter.
is_faculty Boolean (URL) Yes Indicates whether the author_id refers to a faculty (true) or a system user (false).

Success Response

{
  "MESSAGE": "",
  "SUCCESS": true,
  "DATA": [
    {
      "BIOGRAPHY": "",
      "AVG_RATING": 4,
      "OBJECT_TYPE_ID": 20,
      "WEB_SITE": "",
      "OBJECT_TYPE_NAME": "Document",
      "ORGANIZATION_NAME": "",
      "USER_ID": 5,
      "EMAIL": "",
      "ICON_FILE_PATH": "https://cdn.brainier.com/_version/_img/icons/sample.png",
      "LAST_NAME": "Smith",
      "DISPLAY_TITLE": "User",
      "FIRST_NAME": "Mary",
      "AVATAR_FILENAME": "https://cdn.brainier.com/012/avatars/5/237DFS7-47D7-B8D-F0A390529AEBBD23.png",
      "OBJECT_ID": 2826,
      "OBJECT_NAME": "Brainier System Requirements",
      "AUTHOR_NO": 1,
      "FACULTY_ID": "",
      "SORT_NO": 1,
      "DURATION": ""
    }
  ]
}
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.