uploadCert

Use the interface to upload CA certificate (.crt).

Only available for users with administrative rights.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/sc_cloud/uploadCert
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

The CA certificate file is as follows.

Request Example

POST /sc_cloud/uploadCert HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------22383205084807890342375037721
Content-Length: 1510
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

-----------------------------22383205084807890342375037721
Content-Disposition: form-data; name="file"; filename="cloudserver.crt"
Content-Type: application/x-x509-ca-cert

-----BEGIN CERTIFICATE-----
MIIDezCCAmOgAwIBAgIUQbp2VyDbpmOm7+hI07YzHX9+fQAwDQYJKoZIhvcNAQEL
BQAwVTELMAkGA1UEBhMCQ04xCzAJBgNVBAgMAkpTMQswCQYDVQQHDAJOSjERMA8G
...
YBTqm8X2bFJgDhO69AtJsPSBsnlHJvODMzyhtuCIGg==
-----END CERTIFICATE-----

-----------------------------22383205084807890342375037721--

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.crt",
  "result": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""