/api/cert/upload

Use this interface to upload a certificate.

System configuration editing permissions are required.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/api/cert/upload
Content-Type Request: Content-Type: multipart/form-data
Response: Content-Type: application/json

Request Cookies

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

The form method uses the multipart/form-data type to encapsulate and submit the certificate file.

Request Example

POST /api/cert/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------42288931224667793852045763104
Content-Length: xxx
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

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


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


-----------------------------42288931224667793852045763104

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
filename File name

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xxx
{
  "result": 0, 
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""