What is Training Record Integration?

Training Record Integration with SafetySkills allows for training records completed in the SafetySkills LMS to be transferred and stored in another system. This feature allows clients to have all of their employee information in one place for simple, efficient and full-picture reporting.

How it Works

  • The SafetySkills system is an open API that will require an active user’s login and password to access the reporting API end point. The client’s application will have secure access to all training data from this endpoint.
    • API Login Path: https://{account domain}.mysafetyskills.com/api/token
    • Assignments Data Path: https://{account domain}.mysafetyskills.com/api/assignments
  • The client application uses a POST command to log into the SafetySkills API Login Path (see above) using the parameters below:

Parameter

 Description

grant_typeMust be password for this authentication flow.
loginLMS User Login
passwordLMS User Password
  • Once the system has logged in, it will have the same permissions as the LMS user’s type.
    • For example, the Owner (a default user type) will have full access to the Reports data, whereas a Learner will have none.
  • The SafetySkills API will generate a bearer token.
  • Once a bearer token is acquired, the client application can access the data endpoint (see above) by providing the token in an authorization header with the bearer schema.
    • The bearer token generated will be needed to complete the process of accessing the API endpoint each time, and the token will expire after 60 minutes.
  • The client can extract data as needed and filter by:
    • “DateFilter” defaults to “ActivationDate” unless otherwise specified. Other options are:
      • “AssignedDate”
        • The date on while an assignment was created, not the same as the Activation Date
      • “ActivationDate”
        • The date on while the assignment can be access for the first time
      • “DueDate”
        • The date an assignment is due by
      • “CompletedDate”
        • The date the assignment was completed on
    • “DateRangeType” is not required and will be considered to “Custom” if not given. Custom requires StartDate and EndDate, the rest do not. These options will require the space between the words.
      • “Current Month”
      • “Next Month”
      • “Previous Month”
      • “In The Past”
      • “In The Future”
      • “Custom”
        • “StartDate”
          • Most date formats accepted except European (DD/MM/YYYY)
            • All time stamps stored in UTC
              • If time is not specified, default will be 12:00am UTC
        • “EndDate”
          • Most date formats accepted except European (DD/MM/YYYY)
            •  All time stamps stored in UTC
              • If time is not specified, default will be 11:59pm UTC
    • “ActiveOnly” specifies if the users are active in the system or not. Values can be:
      • “true” (default value)
        • Meaning the users are currently active
      • “false”
        • Meaning the users are not currently active
  • User ID’s, Assignment ID’s, Course ID’s, and Session Codes will always be unique. Those data points can be used as constants for updating user/assignment records

Some examples of data requests:

  • Active users with dues date in the current month:
    • https://exampleaccount.mysafetyskills.com/api/assignments?ActiveOnly=true&DateFilter=DueDate&DateRangeType=Current Month
  • Active users and all assignments that activated in 2021
    • https://exampleaccount.mysafetyskills.com/api/assignments?DateFilter=ActivationDate&StartDate=1-1-2021&EndDate=12-31-2021

Available Fields

The following fields are available to be utilized through Training Record Integration:

Field NameField Location (Associated Record)

Field Type

UserIdUserInt
FirstNameUserVarChar(100)
LastNameUserVarChar(100)
LoginUserVarChar(100)
LastLoginDateUserSmallDateTime
EmailUserVarChar(100)
IsActiveUserBoolean
Custom0-17UserVarChar(100)
CourseNameCourseVarChar(100)
CourseIdCourseVarChar(10)
CEUCourseSmallMoney
IdAssignmentUniqueIdentifier
ActivationDateAssignmentSmallDateTime
AssignedDateAssignmentSmallDateTime
DueDateAssignmentSmallDateTime
CompletedDateAssignmentSmallDateTime
TotalTimeAssignmentVarChar(13)
LessonStatusAssignmentVarChar(10)
Type (Manual vs Auto Assign)AssignmentVarChar(100)
Available (Online vs. Offline vs. Attachment)AssignmentVarChar(100)
InstructorAssignmentVarChar(100)
LastAccessedOnAssignmentSmallDateTime
ScoreAssignmentDecimal
SessionCodeSessionVarChar(100)
SessionEndsOnSessionSmallDateTime
SessionInformationSessionVarChar(max)
SessionStartsOnSessionSmallDateTime
SessionTimeZoneSessionVarChar(100)
SessionIdSessionInt
SessionStatusSessionVarChar(100)

If you have any questions or need further assistance with configuring Training Record Integration please contact our Help Desk at support@safetyskills.com or calling 405-463-6656.