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

Downloading a Report

Function

This API is used to download the chaincode security check report.

URI

POST /v2/agent/apis/chaincode/report

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

chaincode_name

Yes

String

Chaincode name, which must be the same as that specified during chaincode installation. This parameter is mandatory when chaincode security check is enabled.

chaincode_version

Yes

String

Chaincode version, which must be the same as that specified during chaincode installation.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

-

File

Success

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error description.

error_msg

String

Error description.

Example Requests

POST https://192.168.0.90:30603/v2/agent/apis/chaincode/report

{
  "chaincode_name" : "chaincode1",
  "chaincode_version" : "1.0"
}

Example Responses

Status code: 400

Bad Request

{
  "error_code" : "BCS.4002068",
  "error_message" : "failed to get report, not existed"
}

Status Codes

Status Code

Description

200

Success

400

Bad Request

Error Codes

See Error Codes.