← Back to support

Manage API integration

With the GET API connector, clients can retrieve user data, including module completion, test results, scores, course completion, and phishing data. The API key and API secret are generated in Edit organisation and provide an encrypted connection.

Please note: this functionality requires a Freedom licence.

Implementing the GET API connector offers several advantages. It allows you to efficiently extract user data, saving time and effort. In addition, it enables seamless integration with other platforms, improving the overall experience.

The configuration can be found in the menu Edit organisation.

Example configuration

Course completed by date by user

Path: https://portal.2lrn4.com/api/courses

Header:

api_key

api_secret

Parameters:

date_from (optional, string, format: \"Y-m-d\")

date_to (optional, string, format: \"Y-m-d\")

users (optional, array)

Response (example):

{

\"status\": \"success\",

\"message\": \"Complete courses\",

\"data\": [

{

\"name\": \"John Doe\",

\"email\": \"john@mail.test\",

\"complete_courses\": [

{

\"course\": \"Test Course\",

\"start_at\": \"2023-01-01\",

\"end_at\": \"2023-01-01\",

\"complete_at\": \"2023-01-01\"

}

]

}

]

}

Retrieving open trainings

Open trainings per user

Path: https://portal.2lrn4.com/api/courses/open

Header:

api_key

api_secret

Parameters:

overdue_only (optional, boolean)

due_before (optional, string, format: "Y-m-d")

This endpoint returns each employee's unfinished trainings, including the deadline, whether it has passed, the number of days overdue and the progress. With overdue_only and due_before you retrieve in one call who is behind. Employees without open trainings, inactive employees and deactivated courses are excluded. See the API documentation for the full response format.

The API secret is shown once

The API secret cannot be read back in the platform: it is shown once, when it is created. Store it in a safe place at that moment, for example a password vault. If the secret is lost, generate a new one in edit organisation; the old one then stops working. Existing integrations keep working as long as you do not renew the secret.

Stuck?

Ask a question or book a short demo. We'll help you move forward.