"POST /openapi/v1/report" method

April 19, 2024

ID 242754

Generate report data about users who are registered on the portal and are completing training on ASAP applications.

The size of the passed data is described in the body of the request.

Request

Header:

  • Authorization – the company's API token.

Body:

  • lng – a string – the language code of the language used for the report. One of the available localization languages in ISO 639-1 format. Required. It is indicated in lowercase letters.

Mapping between the report language and value of lng:

Locale

Value of lng

English

en

Bosanski

bs

Català

ca

Čeština

cs

Dansk

da

Deutsch

de

Ελληνικά

el

Español (España)

es

Еspañol (México)

mx

Français

fr

Hrvatski

hr

Italiano

it

Қазақша

kk

Magyar

hu

Nederlands

nl

Polski

pl

Português (Brasil)

br

Português (Portugal)

pt

Română

ro

Русский

ru

Slovenský

sk

Srpski

sr

Svenska

sv

Türkçe

tr

العربية

ar

日本語

ja

漢語

zh

  • email – an array – the user's email address. Indicated to get data on a specific user. Optional.

    Requirements on indicated addresses: 1) they must be indicated in lowercase letters, 2) they must contain the symbols "@" and ".".

Example of the body of a request:

{

    "lng":"en",

    "email":["example@email.com","jackrockstar88@email.com"]

}

Response

JSON containing an array of data about each user:

  • id – a string – the ID assigned to the employee on the ASAP platform.
  • email – a string – the email addressed used to register the user.
  • shortName – a string – The user's registered short name.
  • fullName – a string – The user's registered full name.
  • group – a string – The user's current training group.
  • educationTime – a string – Length of training in seconds.
  • mainEducationProgress – a string – Performance category in the main course.
  • expressEducationProgress – a string – Performance category in the express course.
  • educationStatus – a string – Current training status.
  • mainEducationProgressPercent – a float – Training progress in the main course, expressed as a percentage in the format xx.xx.
  • expressEducationProgressPercent – a float – Training progress in the express course, expressed as a percentage in the format xx.xx.
  • mainEducationEndPlan – a date – Planned date for completion of the main course.
  • expressEducationEndPlan – a date – Planned date for completion of the express course.
  • realMainEducationEnd – a date – Date of completion of the main course.
  • realExpressEducationEnd – a date – Date of completion of the express course.
  • educationMainCourses – an array – Training courses and training status in the main course.

    Response format:

    [

    {

    code,

    level,

    status,

    startedAt,

    finishedAt

    }

    ]

    where:

    • code is the course name, which depends on the localization language.
    • level is the training level. The following values are possible:
      • 1 – "Beginner".
      • 2 – "Elementary".
      • 3 – "Intermediate".
      • 4 – "Advanced".
    • status is the training status in the course. The following values are possible:
      • 0 – "Assigned". The course is available for the employee to complete as part of his or her current individual training path. The course will be available after the current module is complete or training is started.
      • 1 – "Completed". The employee received a certificate of completion.
      • 2 – "In progress". The employee is working through the course as part of his or her current individual training path.
    • startedAt – The date and time when the employee started the training module, expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ss. The date format (YYYY-MM-DD) depends on the input language.
    • finishedAt – The date and time of completion of the module (for which a certificate was received), in ISO 8601 format: YYYY-MM-DDThh:mm:ss. The date format (YYYY-MM-DD) depends on the input language. If data is missing, an empty value is returned.

    If there is no data, an empty array is formed.

  • educationExpressCourses – an array – training courses and training status in the express course.

    Response format:

    [

    {

    code,

    level,

    status,

    startedAt,

    finishedAt

    }

    ]

    where:

    • code is the course name, which depends on the localization language.
    • level is the training level.
    • status is the training status in the course. The following values are possible:
      • 0 – "Assigned". The course is available for the employee to complete as part of his or her current individual training path.
      • 1 – "Completed".

      A check is underway to determine whether testing is enabled for the current training. If testing is enabled and the test for the module was passed, or if testing is enabled and there is note aboue gaining a skill, then "status" equals 1. Otherwise, "status" equals 0.

    • startedAt – The date and time when the employee started the training module, expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ss. The date format (YYYY-MM-DD) depends on the input language.
    • finishedAt – The date and time of completion of the module (for which a certificate was received), in ISO 8601 format: YYYY-MM-DDThh:mm:ss. The date format (YYYY-MM-DD) depends on the input language. If data is missing, an empty value is returned.

    If there is no data, an empty array is formed.

  • dateLastActive – a date – The date of the most recent activity, in a format that depends on the input localization language.
  • certificatesReceived – an int – The total number of certificates received by the user during training.

    If the user has not started training or has not received any certificates, "0" is returned.

  • phishingAttacks – an array – Information about a phishing attack during training on the ASAP platform.

    Response format:

    [

    {

    code: '''',

    level: '''', 

    startedAt: '''', 

    phishingAttackLetter: '''', 

    phishingAttackResult: '''',

    followPhishingLinkAt: ''" || null

    }

    ]

    where:

    • code is the locale-dependent name of the training module that involves sending a phishing email.
    • level is the training level. The following values are possible:
      • 1 – "Beginner".
      • 2 – "Elementary".
      • 3 – "Intermediate".
      • 4 – "Advanced".

      An empty value is returned for the phishing emails sent as part of a phishing campaign.

    • startedAt – The date and time when the employee started the training module, expressed in ISO 8601 format: YYYY-MM-DDThh:mm:ss. The date format (YYYY-MM-DD) depends on the input language.
    • phishingAttackLetter is the title of the phishing email. When phishing emails are sent using a template, the title entered by the administrator is used. The title depends on the input localization language.
    • phishingAttackLetter is the result of the phishing attack. The following values are possible:
      • 0 – A phishing email has been sent. A response from the user is currently being waited for.
      • 1 – The user avoided the phishing attack.
      • 2 – The user fell for the phishing.
    • followPhishingLinkAt is the date and time when the phishing link was followed. It is generated only for "phishingAttackResult": 2. In other instances, an empty value is returned.  

    If there is no data, an empty array is formed.

Example of a response:

{

"idl":"60e050803050c0704080a0e060",

"email":"jackrockstar88@email.com",

"shortName":"Jack",

"fullName":"Jack Rock",

"group":"Low Risk",

"educationTime":"00:14:00",

"mainEducationProgress":"Behind schedule",

"expressEducationProgress":"In progress",

"educationStatus":"not started",

"mainEducationProgressPercent":"50.00",

"expressEducationProgressPercent":"14.80",

"mainEducationEndPlan":"2022-08-08",

"expressEducationEndPlan":"0001-01-01",

"realMainEducationEnd":"0001-01-01",

"realExpressEducationEnd":"0001-01-01",

"educationCourses":

[

{

  code: 'Password',

  level: 1 || null,

  status: 'Open' || 'passed'

  startedAt: '' 

  finishedAt: '' || null,

  }

],

"dateLastActive":"2022-08-08",

"certificatesReceived":2

}

"phishingAttack": 

[

{

code: 'Password',

level: 1

startedAt: '2022-09-09T18.00.00.0Z', 

phishingAttackLetter: 'Hallo!', 

phishingAttackResult: '0',

followPhishingLinkAt: null

}

]

Possible errors:

  • 200success – The operation succeeded.
  • 401common-unauthorized – There was an authentication error. 
  • 404user not found – An invalid email address was sent. 
  • 400 bad request – Something is wrong with the request.
  • 500internal-server-error – there was an internal server error.

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.