Package Score API

Package API for updating Trainee’s lesson score in EON-XR Portal. This API can be called multiple times for each Trainee and each time the API is called the Portal will save a new iteration of the Trainee score information.

Request Syntax

Post /PackageExternal/PackageReportSetScore

Content-type: application/json

{
    "Token": "string",
    "Duration": number,
    "Score": number,
    "FailedLessonSteps": "string",
    "CriticalErrors": "string",
    "LessonDeviations": "string"
}

Request Body

The request accepts the following data in JSON format.

Example Values

Content-type: application/json

{
    "token": "a570a9e74bbc43c3b180e63b0afb704c",
    "duration": 1200,
    "score": 122.28,
    "failedLessonSteps": "Drain the Radioactive Water Separator - Ensure a suitable NUclear PPE is available.",
    "criticalErrors": "The user fueled the spacecraft incorrectly with Cooking Oil.",
    "lessonDeviations": "The spacecraft is not in vertical state."
}

Properties Details

Token

Description:

The Token value that was pass from the --token argument. Refer to Option List for more information.

Type:

string

Required:

Yes

Example:

a570a9e74bbc43c3b180e63b0afb704c

Duration

Description:

This is the time Trainee spend on the lesson. The duration value is in seconds.

Type:

Number

Required:

Yes

Example:

1200

Score

Description:

This is the lesson score awarded to the Trainee.

Type:

Number

Required:

Yes

Example:

122.28

FailedLessonSteps

Description:

The detailed explanation on the Trainee failed lesson step.

Type:

string

Required:

No

Example:

Drain the Radioactive Water Separator - Ensure a suitable NUclear PPE is available.

CriticalErrors

Description:

The detailed explanation on the Trainee Critical Errors.

Type:

string

Required:

No

Example:

The user fueled the spacecraft incorrect.

LessonDeviations

Description:

The detailed explanation on the lesson deviations if any.

Type:

string

Required:

No

Example:

The spacecraft is not in vertical state.

Responses Syntax

Content-type: application/json

{
    "Status": number,
    "Message": "string",
}

Example Values

Code: 200

Content-type: application/json

{
    "Status": 1,
    "Message": "Success"
}

Properties Details

status

Description:

Returns the status for the request.

Possible Values:
  • “1” - Score is set successfully

  • “0” - Failure to set score, see message property for more information

Type:

number

Required:

Yes

Example:

“0”

message

Description:

Returns the corresponding Description for each of the request status.

Possible Values:
  • “Success” - Describe record is successfully inserted into database and the corresponding status is “1”.

  • “Failed to Create record” - Describe unsuccessful insert record into database and the corresponding status is “0”.

  • “Invalid parameters” - Describe Request parameters are invalid or missing parameters. The corresponding status is “0”.

  • “Exception error” - Describe an unhandled exception has occurred, and the corresponding status is “0”.

Type:

number

Required:

Yes

Example:

“Failed to Create record”