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

Querying the System-Hosted Certificate Status

Function

This API is used to query the status of a certificate that is hosted by system.

URI

POST /v2/agent/apis/cert/status/{channel_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

channel_id

Yes

String

Channel name. The value can contain 4 to 24 characters and cannot be the same as the system channel name (testchainid).

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

user_name

No

String

Username used for generating a user certificate. Either user_name or cert_value needs to be transferred. The service preferentially reads the value of user_name. Users can use the username or directly transfer the certificate content to query the certificate status.

cert_value

No

String

Certificate content returned by the Generating a User Certificate API. The content is the content of the signcerts file in the file returned by the API for generating a user certificate, and \n is added to the end of the parameter value.

org_name

Yes

String

Organization name used for generating a user certificate.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of booleans

Request sent. Certificate status contained in the response, which can be true (normal) or false (frozen).

Status code: 400

Table 5 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/cert/status/channeltest

Example Responses

Status code: 400

Bad Request

{
  "error_code" : "BCS.4000013",
  "error_msg" : "request body is too large"
}

Status Codes

Status Code

Description

200

Request sent. Certificate status contained in the response, which can be true (normal) or false (frozen).

400

Bad Request

Error Codes

See Error Codes.