-
请求示例 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-AC
CES S-TOKEN: x-yyyyyy
-
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:操作成功。 HTTP/1.1 200 OK
Date: Sun,11 May 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,11 May 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,11 May 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/members/fbde1c5d-5b94-49e3-a912-48641015e45c/properties 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,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"bindingName" : "binding1",
"deviceRoles" : ["Gateway","CORE"],
"deviceTypes" : ["AP","LSW"],
"deviceModels" : ["S12700E-4","S12700E-12"],
"deviceNameContains" : "device1",
"id" : "00000000-0000-0000-0000-000000000000"
} 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 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,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
响应参数 返回状态码为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-ACCESS-TOKEN: x-yyyyyy
{
"siteIds" : [
"00000000-0000-0000-0000-000000000000"
]
}
-
响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK
Date: Sun,11 May 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,11 May 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,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
请求示例 HTTP的示例 POST /v1/networkservice/hierarchy-template/template-groups/templates/action/batch-create 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
{
"templates" : [
{
"type" : "copy",
"extendsTemplateInfo" : {
"parentTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1"
},
"copyTemplateInfo" : {
"sourceTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1"
}
}
]
}
-
响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"success" : [
{
"type" : "copy",
"originTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1",
"rootTemplateId" : "00000000-0000-0000-0000-000000000000"
}
],
"fail" : [
{
"errcode" : "0x00c80035",
"errmsg" : "Invalid parameter.",
"data" : {
"type" : "copy",
"originTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1",
"rootTemplateId" : "00000000-0000-0000-0000-000000000000"
}
}
]
} 返回状态码为207:部分成功。 HTTP/1.1 207 Multi-Status
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"success" : [
{
"type" : "copy",
"originTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1",
"rootTemplateId" : "00000000-0000-0000-0000-000000000000"
}
],
"fail" : [
{
"errcode" : "0x00c80035",
"errmsg" : "Invalid parameter.",
"data" : {
"type" : "copy",
"originTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1",
"rootTemplateId" : "00000000-0000-0000-0000-000000000000"
}
}
]
} 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"success" : [
{
"type" : "copy",
"originTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1",
"rootTemplateId" : "00000000-0000-0000-0000-000000000000"
}
],
"fail" : [
{
"errcode" : "0x00c80035",
"errmsg" : "Invalid parameter.",
"data" : {
"type" : "copy",
"originTemplateId" : "00000000-0000-0000-0000-000000000000",
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"templateDescription" : "this is template1",
"rootTemplateId" : "00000000-0000-0000-0000-000000000000"
}
}
]
} 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
响应参数 返回状态码为200:操作成功。 表6 CreateTemplatesResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 0 错误码。 "0" errmsg string 0~256个字符。 错误信息。 "" success ARRAY_REFERENCE 0-20个列表项,详细请参见表3。 成功的模板列表。 - fail ARRAY_REFERENCE 0-20个列表项,详细请参见表7。 失败的模板列表。 - 表7 DataDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 0 错误码。 "0x00c80035" errmsg string 0~256个字符。 错误信息。 "Invalid parameter." data REFERENCE 详细请参见表3。 模板信息。 - 返回状态码为207:部分成功。 CreateTemplatesResponse对象的参数列表,详细请参见表6。 返回状态码为400:校验异常。 CreateTemplatesResponse对象的参数列表,详细请参见表6。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
-
请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 templates 是 REFERENCE 详细请参见表2。 批量创建模板入参。 - 表2 CreateTemplatesInput对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 templates 是 ARRAY_REFERENCE 1-20个列表项,详细请参见表3。 模板列表。 - 表3 Template对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 type 是 string 1~10个字符。满足正则表达extends|copy。 - 创建类型。extends:继承创建,copy:复制创建。 "copy" extendsTemplateInfo 否 REFERENCE 详细请参见表4。 继承创建入参。 - copyTemplateInfo 否 REFERENCE 详细请参见表5。 复制创建入参。 - 表4 ExtendsTemplateInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 parentTemplateId 是 string 36个字符。 - 父模板ID "00000000-0000-0000-0000-000000000000" templateName 是 string 1~128个字符。 - 名称。 "template1" templateDescription 否 string 0~1024个字符。 - 描述。 "this is template1" 表5 CopyTemplateInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 sourceTemplateId 是 string 36个字符。 - 源模板ID "00000000-0000-0000-0000-000000000000" templateName 是 string 1~128个字符。 - 名称。 "template1" templateDescription 否 string 0~1024个字符。 - 描述。 "this is template1"
-
请求示例 HTTP的示例 POST /v1/networkservice/hierarchy-template/template-groups/00000000-0000-0000-0000-000000000000/members 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
{
"members" : [
{
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"bindingProperties" : {
"bindingName" : "binding1",
"deviceRoles" : ["Gateway","CORE"],
"deviceTypes" : ["AP","LSW"],
"deviceModels" : ["S12700E-4","S12700E-12"],
"deviceNameContains" : "device1"
}
}
]
}
-
响应示例 返回状态码为201:操作成功。 HTTP/1.1 201 Created
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"members" : [
{
"templateId" : "00000000-0000-0000-0000-000000000000",
"templateName" : "template1",
"bindingProperties" : {
"bindingName" : "binding1",
"deviceRoles" : ["Gateway","CORE"],
"deviceTypes" : ["AP","LSW"],
"deviceModels" : ["S12700E-4","S12700E-12"],
"deviceNameContains" : "device1"
},
"id" : "00000000-0000-0000-0000-000000000000",
"description" : "this is template group member1",
"featureNum" : "",
"createTime" : "1713880927744"
}
]
} 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 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,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 templateGroupMembers 是 REFERENCE 详细请参见表3。 模板组成员列表。 - 表3 TemplateGroupMembers对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 members 否 ARRAY_REFERENCE 1-20个列表项,详细请参见表4。 模板组列表。 - 表4 TemplateGroupMember对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 templateId 是 string 36个字符。 - 模板ID,UUID格式。 "00000000-0000-0000-0000-000000000000" templateName 是 string 1~1024个字符。 - 模板名称。 "template1" bindingProperties 是 REFERENCE 详细请参见表3。 绑定属性。 -