Querying Certificate Details
Function
This API is used to query details about a certificate.
URI
GET /v1/private-certificates/{certificate_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
certificate_id |
Yes |
String |
ID of the private certificate you want to query. Minimum: 36 Maximum: 36 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the token API of IAM. The value of X-Auth-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
certificate_id |
String |
ID of the private certificate Minimum: 36 Maximum: 36 |
|
status |
String |
Certificate status:
|
|
issuer_id |
String |
ID of the parent CA. Minimum: 36 Maximum: 36 |
|
issuer_name |
String |
The name of the parent CA certificate. Minimum: 1 Maximum: 64 |
|
key_algorithm |
String |
Key algorithm |
|
signature_algorithm |
String |
Signature algorithm |
|
freeze_flag |
Integer |
Freezing tag:
|
|
gen_mode |
String |
Certificate generation method.
|
|
serial_number |
String |
Serial number. Minimum: 1 Maximum: 64 |
|
create_time |
Long |
Time the certificate was created. The value is a timestamp in milliseconds. |
|
delete_time |
Long |
Time the certificate was deleted. The value is a timestamp in milliseconds. |
|
not_before |
Long |
Time the certificate was created. The value is a timestamp in milliseconds. |
|
not_after |
Long |
Time the certificate expires. The value is a timestamp in milliseconds. |
|
distinguished_name |
DistinguishedName object |
Certificate name. For details, see data structure for the DistinguishedName field. |
|
Parameter |
Type |
Description |
|---|---|---|
|
common_name |
String |
Common certificate name (CN). Minimum: 1 Maximum: 64 |
|
country |
String |
Country code, which must comply with the regular expression "[A-Za-z]{2}". Minimum: 2 Maximum: 2 |
|
state |
String |
State or city name. Minimum: 1 Maximum: 128 |
|
locality |
String |
Country/Region. Minimum: 1 Maximum: 128 |
|
organization |
String |
Organization name. Minimum: 1 Maximum: 64 |
|
organizational_unit |
String |
Organization Unit (OU). Minimum: 1 Maximum: 64 |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code Minimum: 3 Maximum: 36 |
|
error_msg |
String |
Error message Minimum: 0 Maximum: 1024 |
Example Requests
When you use this API to query details about a certificate, a token is required in the X-Auth-Token field in the request header. The token must have the permission to access the API.
GET https://ccm.ae-ad-1.myhuaweicloud.com/v1/private-certificates/6434f74f-2d13-4e6a-89eb-93ee313f1a43
Example Responses
Status code: 200
Request succeeded.
{
"signature_algorithm" : "SHA256",
"issuer_id" : "ef5d84d1-4f52-47d2-b1c8-a91a672487a0",
"issuer_name" : "your CA name",
"not_after" : 1665539214000,
"not_before" : 1634295475000,
"status" : "ISSUED",
"freeze_flag" : 0,
"gen_mode" : "GENERATE",
"serial_number" : "202110151057541266081861",
"distinguished_name" : {
"country" : "your country abbreviation",
"state" : "your state",
"locality" : "your locality",
"organization" : "your organization",
"organizational_unit" : "your unit",
"common_name" : "your CN"
},
"key_algorithm" : "RSA4096",
"create_time" : 1634295475000,
"delete_time" : null,
"certificate_id" : "6434f74f-2d13-4e6a-89eb-93ee313f1a43"
}
Status code: 400
Invalid request parameters.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 401
Token required for the requested page.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 403
Authentication failed.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 404
No resources available or found.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status code: 500
Internal service error.
{
"error_code" : "PCA.XXX",
"error_msg" : "XXX"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
400 |
Invalid request parameters. |
|
401 |
Token required for the requested page. |
|
403 |
Authentication failed. |
|
404 |
No resources available or found. |
|
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.