Skip to main content

API Documentation

Updated over 5 months ago

The API in Smart Arena enables seamless integration. With the API, organizations can extend Smart Arena's capabilities to fit their specific needs.

The Smart ARENA API enables the updating of data related to users, organizational units, and locations in the Smart ARENA application. It operates using the OAuth2 protocol (grant_type: client_credentials), which can be accessed via defined method calls. 

API

Before executing methods for managing users, organizational units, and locations, you need to acquire a token by calling the oauth/access_token method. This token must be included in the authorization header of the request (Authorization: "Bearer [access_token]").

To receive access credentials for obtaining the token, please provide the administrator's details and an email address to which we will send the access information.

The API is accessible at the IP address 145.14.14.126 (esmartarena.com) using the methods listed below.

Before making method calls to update data on users, locations, and organizational units, you must first obtain an access token by calling:

https://esmartarena.com/oauth/access_token (POST Method)

This method provides a token, which is then used to execute other API method calls.

Required request parameters:

  • client_id

  • client_secret

  • grant_type (client_credentials)

For the correct functioning of data updates via the Smart ARENA API, it is necessary to ensure that each instance of entered data is linked to the identifier of the system where the source data is stored. The instance identifier must be associated with the parameter mapping_code.


Smart Arena API methods

The methods provided by the API are designed for reading, adding, updating, and deleting data related to users, organizational units, and locations (parameters marked with * are mandatory).

USERS

GET https://esmartarena.com/api/users
This method retrieves data about all users in the organization.

Method Parameters:

  • mapping_code – filters data for a specific mapping_code.

  • email – filters data for a specific email.

POST https://esmartarena.com/api/users

This method creates a new user instance.

Method Parameters:

  • mapping_code*

  • email*

  • firstname*

  • lastname*

  • date_of_birth [yyyy-mm-dd]

  • branch_mapping_code

  • location_mapping_code

  • workplace_mapping_code

  • password

  • language_code

  • register_mail

  • roles

  • synch_protected

Allowed Parameter Values:

  • language_code:
    1 - English
    3 - Slovenian
    8 - Russian
    39 - Croatian

  • register_mail:
    0 - The user will not receive a registration email immediately upon registration.
    1 - The user will receive a registration email immediately upon registration.

  • synch_protected:
    0 - The user will not be protected from overwriting via the API.
    1 - The user will be protected from overwriting via the API.

  • roles:
    3 - Organization Administrator
    4 - HR Manager
    6 - User
    9 - Content Developer
    11 - Unit Manager
    12 - Content Editor
    15 - HR Manager with Limited Rights

PUT https://esmartarena.com/api/users

This method updates the data of a user instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • date_of_birth [yyyy-mm-dd]

  • email

  • firstname

  • lastname

  • branch_mapping_code

  • location_mapping_code

  • workplace_mapping_code

  • password

  • language_code

  • roles

  • synch_protected

DELETE https://esmartarena.com/api/users
This method deletes user instances identified by mapping_code.

Method Parameters:

  • mapping_code*

  • delete_mode – [1 - partial deletion, 2 - full deletion (default)]

ORGANIZATIONAL UNITS

GET https://esmartarena.com/api/branches
This method retrieves data about all organizational units of the organization.

Method Parameters:

  • mapping_code – filters data for a specific mapping_code.

POST https://esmartarena.com/api/branches
This method creates a new instance of an organizational unit.

Method Parameters:

  • mapping_code*

  • parent_mapping_code*

  • name*

PUT https://esmartarena.com/api/branches
This method updates data of an organizational unit instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • parent_mapping_code

  • name

DELETE https://esmartarena.com/api/branches
This method deletes an organizational unit instance identified by mapping_code.

Method Parameters:

  • mapping_code*

LOCATIONS

GET https://esmartarena.com/api/locations
This method retrieves data about all locations within the organization.

Method Parameters:

  • mapping_code – filters data for a specific mapping_code.

POST https://esmartarena.com/api/locations
This method creates a new instance of a location.

Method Parameters:

  • mapping_code*

  • name*

PUT https://esmartarena.com/api/locations
This method updates data for a location instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • name

DELETE https://esmartarena.com/api/locations
This method deletes a location instance identified by mapping_code.

Method Parameters:

  • mapping_code*

WORKPLACES

GET https://esmartarena.com/api/workplaces
This method retrieves data about all workplaces within the organization.

Method Parameters:

  • mapping_code – filters data for a specific mapping_code.

POST https://esmartarena.com/api/workplaces
This method creates a new instance of a workplace.

Method Parameters:

  • mapping_code*

  • name*

PUT https://esmartarena.com/api/workplaces
This method updates data for a workplace instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • name

DELETE https://esmartarena.com/api/workplaces
This method deletes a workplace instance identified by mapping_code.

Method Parameters:

  • mapping_code*

QUALIFICATIONS

GET https://esmartarena.com/api/qualifications
This method retrieves data about all qualification groups within the organization.

Method Parameters:

  • mapping_code – filters data for a specific mapping_code.

POST https://esmartarena.com/api/qualifications
This method creates a new instance of a qualification group.

Method Parameters:

  • mapping_code*

  • parent_mapping_code*

  • name*

PUT https://esmartarena.com/api/qualifications
This method updates data for a qualification group instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • parent_mapping_code

  • name

DELETE https://esmartarena.com/api/qualifications
This method deletes a qualification group instance identified by mapping_code.

Method Parameters:

  • mapping_code*

COURSE

GET Content https://esmartarena.com/api/content
This method retrieves data about all organization content.

Returned Data:

  • id

  • title

  • description

  • short_description

  • is_published

  • duration_hour

  • duration_minute

  • publish_date

  • content_requirements

  • content_goals

  • target_audience

  • step_count

Method Parameters:

  • content_type [null – all available content; 0 – only internal content; 1 – only public content]

GET Courses https://esmartarena.com/api/courses
This method retrieves data about all organization courses.

Returned Data:

  • id

  • mapping_code

  • title

  • start_date

  • end_date

  • type [1 – e-course, 2 – blended, 3 – live]

  • assessment_on_end

  • number_of_attempts

  • assessment_show_questions_at_end

  • mandatory_time

  • prerequired_content

  • content_id

  • confirmation_of_completion

  • access_days_from_enrollment

  • course_category_id

  • course_category_mapping_code

  • course_category_name

  • course_category_parent_id

  • course_category_parent_mapping_code

  • course_category_parent_name

  • qualification_mapping_code

  • qualification_name

  • qualification_parent_mapping_code

  • qualification_parent_name

  • users

  • content

  • instructor

  • live_sessions

Method Parameters:

  • page – paginated data; this parameter sets the page.

  • mapping_code – filters data for a specific mapping_code.

  • archived – [0 – without archived courses, 1 – with archived courses (default)].

  • sort – [date_desc – newest to oldest, date_asc – oldest to newest (default)].

  • type – [1 – e-courses only, 5 – in-person courses only, 254 – market courses only, 253 – curriculum courses only, no parameter – all courses (default)].

POST https://esmartarena.com/api/courses
This method creates a new course instance.

Method Parameters:

  • mapping_code*

  • title*

  • start_date*

  • end_date

  • type [1 – e-course, 2 – blended, 3 – live]

  • assessment_on_end

  • number_of_attempts

  • assessment_show_questions_at_end

  • mandatory_time

  • prerequired_content

  • instructor_mapping_code

  • content_id

  • confirmation_of_completion

  • users_mapping_codes (array)

  • access_days_from_enrollment

PUT https://esmartarena.com/api/courses
This method updates course data for an instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • title

  • start_date

  • end_date

  • type [1 – e-course, 2 – blended, 3 – live]

  • assessment_on_end

  • number_of_attempts

  • assessment_show_questions_at_end

  • mandatory_time

  • prerequired_content

  • instructor_mapping_code

  • content_id

  • confirmation_of_completion

  • access_days_from_enrollment

DELETE https://esmartarena.com/api/courses
This method deletes a course instance identified by mapping_code.

Method Parameters:

  • mapping_code*

  • delete_mode – [1 – soft delete, 2 – permanent delete (default)].

POST Add Users https://esmartarena.com/api/courses/addusers
This method adds users to a course identified by mapping_code.

Method Parameters:

  • mapping_code*

  • users_mapping_codes (array)*.

POST Remove Users https://esmartarena.com/api/courses/removeusers
This method removes users from a course identified by mapping_code.

Method Parameters:

  • mapping_code*

  • users_mapping_codes (array)*.

POST Update Course Mapping Code https://esmartarena.com/api/coursemappingcode
This method updates the mapping code of a course.

Method Parameters:

  • old_mapping_code*

  • new_mapping_code*.

GET User Course Activities https://esmartarena.com/api/usercourses
This method retrieves data about user activities on courses within the organization.

Method Parameters:

  • updated_at – returns activities where the status was changed after this parameter.

  • date_finished – returns activities where the completion date was after this parameter.

  • page – paginated data; this parameter sets the page.

  • user_mapping_code – filters data for a specific user_mapping_code.

  • modules_data – [0 – without course modules, 1 – with course modules (default)].

  • type – [1 – only e-courses, 5 – only in-person courses, 254 – only market courses, 253 – only curriculum courses, no parameter – all courses (default)].

Returned Data:

  • course_mapping_code

  • course_title

  • user_mapping_code

  • user_name

  • user_surname

  • user_email

  • organizational_unit_mapping_code

  • location_mapping_code

  • created_at

  • updated_at

  • date_start

  • date_completed

  • progress

  • score

  • time_on_course

  • certificate_link

  • statement_link

  • parent_course_mapping_code

  • course_category_id

  • course_category_mapping_code

  • course_category_name

  • course_category_parent_id

  • course_category_parent_mapping_code

  • course_category_parent_name

  • qualification_mapping_code

  • qualification_name

  • qualification_parent_mapping_code

  • qualification_parent_name

  • status – [0 – not started, 1 – started, 2 – finished, 3 – certified, 4 – conditions met].

  • access_end_date

  • has_access

  • assessment_url

  • live_sessions.

EXAMPLE REQUEST (raw request body)

jsonCopy code{ "mapping_code": "test-code-update", "email": "[email protected]", "firstname": "Api", "lastname": "Test", "branch_mapping_code": "api-branch-01", "location_mapping_code": "api-location-01", "username": "apiusernameupdate", "date_of_birth": "2017-07-22", "roles": [4, 6] }


For additional information contact our support team.

Did this answer your question?