uploadCertKey

Use the interface to upload a PEM file stored CA private key.

Only available for users with administrative rights.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/sc_cloud/uploadCertKey
Data Format Request: Content-Type: multipart/form-data; boundary=xxx
Response: Content-Type: application/json

Request Cookies

Parameter Description
mwcloud-sid A string value that is used to uniquely identify user logged-in.
mwcloud-uid Current logged-in username.
Request Body

A CA private key file is shown as follows.

Request Example

POST /sc_cloud/uploadCertKey HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------185266796315308751253203420120
Content-Length: 1920
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

-----------------------------185266796315308751253203420120
Content-Disposition: form-data; name="file"; filename="cloudserver.pem"
Content-Type: application/octet-stream

-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxuYuD0+i1XNHvTRV+2HLltNUNuiA15gh+OAGwJ7yhsXLrtEg
EMCbETTvTzMEgEfH1ya3fPKywDeO84VT6/RId6OtZY6RC/pDayRenQhABgQQe2l6
...
aoMgVhx+L+FFm9wgKHnZrLVRjN+Z26GLXWkkkSGaoJAAIMxPPy44Jg==
-----END RSA PRIVATE KEY-----

-----------------------------185266796315308751253203420120--

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code. The options are as follows:
  • 0: success.
  • Other values. For details about the result codes, please refer to API Status.
filename File name.

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 31
{
  "filename": "/data/cloudserver.pem",
  "result": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""