Updated on 2023-09-27 GMT+08:00

Updating Ratings (updateScore)

Scenario

This interface is invoked to update the operation score of the questionnaire module by the UEBA.

Method

This interface supports only the POST method.

URI

https://domain name/apiaccess/ngcrmpfcore_js/csf/exam/sorceresult, for example, service.besclouds.com.

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

The value is fixed at application/json.

2

Authorization

String

Yes

Authentication field. The format is Bearer +AccessToken returned by the tokenByAKSK interface. (A space is required next to Bearer.)

3

x-app-key

String

Yes

App key field, which is the user ID. Contact the operation personnel to obtain the app key.

4

quotiety

String

No

Weight of the operation score.

A positive integer less than 100.

5

totalScore

String

No

Total score of the questionnaire module.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

params

object

Yes

-

1.1

exam_id

String (32)

Yes

Unique exam ID.

1.2

param

object

Yes

-

1.2.1

code

String (16)

Yes

Result codes of the UEBA interface for ending an exam.

The value 0 indicates success,

and other values indicate exceptions.

1.2.2

msg

String (256)

No

Description of the processing result of the UEBA interface for ending an exam.

1.2.3

result

String (8)

Yes

This parameter is used to calculate the score. A maximum of eight digits before the decimal point, and two decimal places are allowed.

Score = Weight of the operation score x Question score/100 x UEBA score (100-point)/100

Response Description

  • Status code: 200
    Table 3 Response body parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1

    rtnCode

    String

    Yes

    Return code.

    The value 0 indicates that the interface is invoked successfully,

    and other values indicate failure.

    2

    rtnMsg

    String

    Yes

    Description of the message returned by the interface.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 403

    Authentication fails.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

  • None

Example

Request header:

{
"Content-Type": application/json
"x-app-key": ********************
"Authorization": Bearer ************************
"totalScore": 90
"quotiety": 80
}
Request parameters:
{
  "params": {
    "exam_id": "1247589060755793923",
    "param": {
      "code": "0",
      "result": "100.0",
      "msg": "Processing succeeded"
    }
  }
}
Response parameters:
{
    "rtnMsg": "query success!",
    "rtnCode": "0"
}