/api/cert/upload-key
上传证书私钥。
需要系统配置编辑权限
接口原型
协议 | HTTP/HTTPS POST |
URL | ip[:port]/api/cert/upload-key |
数据格式 | 请求消息:Content-Type: multipart/form-data 响应消息:Content-Type: application/json |
请求Cookies
名称 | 描述 |
---|---|
mwcloud-sid | 用于标识当前登录的字符串 |
mwcloud-uid | 当前登录用户名 |
Request Body
表单方式采用multipart/form-data类型封装提交的证书文件
请求示例
POST /api/cert/upload-key HTTP/1.1
Content-Type: multipart/form-data; boundary=---------------------------22383205084807890342375037721
Content-Length: 1920
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
-----------------------------22383205084807890342375037721
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-----
-----------------------------22383205084807890342375037721--
响应参数
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,
}