云服务器内容精选

  • 响应参数 返回状态码为200:操作成功。 表4 TemplateGroupBindUnboundResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 1~64个字符。 0 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 "" taskId string 36个字符。 - 绑定/解绑任务ID,UUID格式。 "00000000-0000-0000-0000-000000000000" 返回状态码为400:校验异常。 CommonDto对象的参数列表,详细请参见表4。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /v1/networkservice/hierarchy-template/template-groups/00000000-0000-0000-0000-000000000000/action/bind HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "siteIds" : [ "00000000-0000-0000-0000-000000000000" ] }
  • 响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "taskId" : "00000000-0000-0000-0000-000000000000" } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 GET /v1/networkservice/hierarchy-template/template-groups/tasks/00000000-0000-0000-0000-000000000000/template-bindings/00000000-0000-0000-0000-000000000000/binding-devices?pageIndex=1&pageSize=20&deviceName=device1&siteName=site1 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "totalRecords" : 100, "data" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "device1", "ip" : "127.0.0.1", "siteName" : "site1", "deployStatus" : "deployment-successed", "deployTime" : "1713880927744", "deployLastVersion" : true, "deployErrorMsg" : {"errorCode":"0x00c8000c","errorType":"APPLICATION","message":"The request failed because the mandatory node is empty"} } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /v1/networkservice/hierarchy-template/template-groups/tasks/{taskId}/template-bindings/{bindId}/binding-devices 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 taskId 是 string 36个字符。 - 绑定任务ID,UUID格式。 "00000000-0000-0000-0000-000000000000" bindId 是 string 36个字符。 - 绑定关系ID,UUID格式。 "00000000-0000-0000-0000-000000000000" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 否 int32 [1-2000] 1 页码。 1 pageSize 否 int32 [1-100] 20 每页数量。 20 deviceName 否 string 0~128个字符。 - 设备名称。 "device1" siteName 否 string 0~128个字符。 - 站点名称。 "site1"
  • 响应示例 返回状态码为200:Success。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "error", "data" : [ { "Id" : "" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为500:内部服务错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:Success。 表3 BatchOperateTemplateGroupResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码,0:请求成功。 "0" errmsg string 0~256个字符。 - 错误信息。 "error" data ARRAY_REFERENCE 0-20个列表项,详细请参见表4。 操作成功的Id集,结构体参见BatchOperateTemplateGroupItem。 - 表4 BatchOperateTemplateGroupItem对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 Id string 36个字符。 - Id,uuid格式。 - 返回状态码为400:校验异常。 CommonDto对象的参数列表,详细请参见表4。 返回状态码为500:内部服务错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /v1/networkservice/hierarchy-template/template-groups/action/batch-delete HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "deleteIds" : ["00000000-0000-0000-0000-000000000000"], "delBindProperties" : false }
  • 响应示例 返回状态码为201:操作成功。 HTTP/1.1 201 Created Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "name" : "group1", "description" : "this is template group1", "id" : "00000000-0000-0000-0000-000000000000", "type" : "preset", "bindingSiteNum" : "", "createTime" : "1713880927744", "updateTime" : "1713880927744" } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 PUT /v1/networkservice/hierarchy-template/template-groups/00000000-0000-0000-0000-000000000000 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "name" : "group1", "description" : "this is template group1" }
  • 响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "totalRecords" : 100, "data" : [ { "name" : "group1", "description" : "this is template group1", "id" : "00000000-0000-0000-0000-000000000000", "type" : "preset", "bindingSiteNum" : "", "createTime" : "1713880927744", "updateTime" : "1713880927744" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /v1/networkservice/hierarchy-template/template-groups 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 keyWord 否 string 0~256个字符。 - 模糊搜索关键字。 - type 否 string 6~16个字符。 - 模板组类型。preset:预置,customize:自定义。可选preset,customize中一个或多个类型。 "preset,customize" templateId 否 string 36个字符。 - 模板组模板ID,uuid格式。 "00000000-0000-0000-0000-000000000000" pageIndex 是 int32 [1-1000] 1 页码。 1 pageSize 是 int32 [1-100] 10 每页大小,最大值为100。 10
  • 响应参数 返回状态码为200:操作成功。 表2 TemplateGroupsQueryResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 totalRecords int32 [0-1000] - 总记录数量。 100 data ARRAY_REFERENCE 0-100个列表项,详细请参见表3。 模板组列表。 - 返回状态码为400:校验异常。 CommonDto对象的参数列表,详细请参见表4。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /v1/networkservice/hierarchy-template/template-groups?type=preset,customize&templateId=00000000-0000-0000-0000-000000000000&pageIndex=1&pageSize=10 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy