手动新增OS
POST
/{adminPath}/insertOs
最后修改时间:2023-08-13 08:55:29
责任人:mryunqi
请求参数
Path 参数
adminPath
string
后台路径
示例值:
admin
Header 参数
Authorization
string
可选
Body 参数application/json
name
string
必需
fileName
string
文件全称,带后缀
type
string
必需
arch
string | null
可选
osType
string | null
可选
downType
integer
必需
url
string | null
可选
path
string | null
可选
cloud
integer | null
可选
示例
{
"name": "Ubuntu-22.04-x64",
"fileName": "Ubuntu-22.04-x64.qcow2",
"type": "linux",
"downType": 37,
"arch": "x86_64",
"url": "http://oa.chuqiyun.com:8877/Cloud/Ubuntu/Ubuntu-22.04-x64.qcow2",
"path": "default",
"osType": "ubuntu",
"cloud": 1
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/admin/insertOs' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Ubuntu-22.04-x64",
"fileName": "Ubuntu-22.04-x64.qcow2",
"type": "linux",
"downType": 37,
"arch": "x86_64",
"url": "http://oa.chuqiyun.com:8877/Cloud/Ubuntu/Ubuntu-22.04-x64.qcow2",
"path": "default",
"osType": "ubuntu",
"cloud": 1
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
string
必需
示例
{
"code": 20000,
"message": "请求成功",
"data": "添加成功"
}
修改于 2023-08-13 08:55:29