/api/cert/upload
上传证书。
需要系统配置编辑权限
接口原型
协议 | HTTP/HTTPS POST |
URL | ip[:port]/api/cert/upload |
数据格式 | 请求消息:Content-Type: multipart/form-data 响应消息:Content-Type: application/json |
请求Cookies
名称 | 描述 |
---|---|
mwcloud-sid | 用于标识当前登录的字符串 |
mwcloud-uid | 当前登录用户名 |
Request Body
表单方式采用multipart/form-data类型封装提交的证书文件
请求示例
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 Header
参数 | 描述 |
---|---|
Content-Type | 取值为:'application/json; charset=UTF-8' |
Response Body
参数 | 描述 |
---|---|
result | 返回码 |
filename | 文件名 |
响应示例
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xxx
{
"result": 0,
}