1. 接口地址
POST /order/openapi/edit
2. 接口参数
{
"shopName": "算力中心名称",
"slgm": "算力规模",
"storageCapacity": "存储总容量(PB)",
"nodesNum": "算力设备数量(个)",
"nodeNum": "计算节点数量",
"investmentScale": "投资规模(亿元)",
"ngsl":"可调度算力",
"bandwidth": "网络带宽(GB)",
"powerCon": "设备平均功耗(KW/H)",
"enterpriseNum": "政企业用户数量(个)",
"userNum": "个人用户数量(个)",
"address": "位置(精确到xx省xx市xx区xx街道xx号)"
}3. 返回值
成功:
{
"code": 200,
"msg": "操作成功",
"data": null
}失败:
{
"code": 500,
"msg": "操作失败",
"data": null
}4. 如何调用
curl示例:
curl -X POST "http://192.168.80.143:8081/order/openapi/edit" \
-H "Authorization: Bearer <API Key>" \
-H "Content-Type: application/json" \
-d '{
"name": "国家超级计算郑州中心",
"storageCapacity": "100",
"bandwidth": "12",
"powerCon": "1.6",
"enterpriseNum": "1056",
"userNum": "4723",
"investmentScale": "11",
"address": "郑州市高新区长椿路与枫杨街交叉口东南角",
"sljg": "C86",
"slgm": "100"
}'java示例:
public static void main(String[] args) {
//请求参数
Map<String, Object> jsonMap = new HashMap<>();
jsonMap.put("name", "国家超级计算郑州中心");
jsonMap.put("storageCapacity", "100");
jsonMap.put("bandwidth", "12");
jsonMap.put("powerCon", "1.6");
jsonMap.put("enterpriseNum", "1056");
jsonMap.put("userNum", "4723");
jsonMap.put("investmentScale", "11");
jsonMap.put("address", "郑州市高新区长椿路与枫杨街交叉口东南角");
jsonMap.put("sljg", "C86");
jsonMap.put("slgm", "100");
//将Map转换为JSON字符串
String json = JSONUtil.toJsonStr(jsonMap);
Map<String, String> headerMap = new HashMap<>();
headerMap.put("Authorization", "Bearer <API Key>");
//链式构建请求
String result = HttpRequest.post("http://192.168.80.143:8081/order/openapi/edit")
.addHeaders(headerMap) //请求头
.body(json) // 设置请求体
.execute().body();
System.out.println(result);
}作者:admin 创建时间:2025-03-03 09:33
最后编辑:尹彦斌 更新时间:2025-06-18 06:39
最后编辑:尹彦斌 更新时间:2025-06-18 06:39