Importing a Certificate
Function
This API is used to import a certificate to SCM.
URI
POST /v3/scm/certificates/import
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-Subject-Token in the response header is the user token. Minimum: 32 Maximum: 2097152 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
SSL certificate name. The value contains 0 to 63 characters. Minimum: 0 Maximum: 255 |
certificate |
Yes |
String |
Certificate content. Use the escape character \n or \r\n to replace carriage return and line feed characters. Minimum: 0 Maximum: 4096 |
certificate_chain |
Yes |
String |
Certificate chain. Use the escape character \n or \r\n to replace carriage return and line feed characters. Minimum: 0 Maximum: 8192 |
private_key |
Yes |
String |
Private key of a certificate. The private key protected by password cannot be uploaded. The carriage return character must be replaced with the escape character \n or \r\n. Minimum: 0 Maximum: 4096 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
certificate_id |
String |
Certificate ID Minimum: 16 Maximum: 16 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code returned for a request. Minimum: 3 Maximum: 36 |
error_msg |
String |
Error message of an error code. Minimum: 0 Maximum: 1024 |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code returned for a request. Minimum: 3 Maximum: 36 |
error_msg |
String |
Error message of an error code. Minimum: 0 Maximum: 1024 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code returned for a request. Minimum: 3 Maximum: 36 |
error_msg |
String |
Error message of an error code. Minimum: 0 Maximum: 1024 |
Example Requests
None
Example Responses
Status code: 200
Normal response.
{ "certificate_id" : "scs1600313391074" }
Status code: 401
Verification failed.
{ "error_code" : "SCM.XXX", "error_msg" : "XXX" }
Status code: 403
Access denied.
{ "error_code" : "SCM.XXX", "error_msg" : "XXX" }
Status code: 500
Failed to respond the request due to an internal server error.
{ "error_code" : "SCM.XXX", "error_msg" : "XXX" }
Status Codes
Status Code |
Description |
---|---|
200 |
Normal response. |
401 |
Verification failed. |
403 |
Access denied. |
404 |
Requested page not found. |
500 |
Failed to respond the request due to an internal server 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot