云服务器内容精选

  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/net/transport-network-ports/activate-new-device 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 { "multipleSubIfEnabled" : false, "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "enhancedMode" : false, "enableNtpAutoClient" : false, "tnps" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ] }
  • 响应示例 返回状态码为201:创建TNP成功,响应体参考TnpResponse。 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 { "errcode" : "0", "errmsg" : "", "success" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ], "fail" : [ { "errcode" : "error", "errmsg" : "error message", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } } ] } 返回状态码为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 返回状态码为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
  • 接口约束 1、该接口仅支持租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用。 2、云站点(AR1000v设备)不支持扩容 3、Pnf站点不支持扩容 4、RR站点不支持扩容 5、全局互联ibgp协议不支持扩容 6、已添加到拓扑并且角色是iwg的站点不支持扩容 7、全局配置MSP RR源不支持扩容 8、已配置ipv6链路的站点不支持扩容 9、已加入开启ipv6的vpn的站点不支持扩容 10、站点已加入的vpn超过8个不支持扩容 11、配置了overlay nat的站点不允许扩容(因为overlay nat不支持双网关) 12、配置了应用质量检测的站点不允许扩容 13、支持的设备款型能力如下: - 对于设备款型:AR6140-16G4XG、AR6140-9G-2AC、AR6140E-9G-2AC、AR6140K-9G-2AC、AR6280、AR6280K、AR6300、AR6300K,支持同款型间扩容,也支持混合款型扩容。 - 对于设备款型:AR651C、AR651F-Lite、AR651K、AR651U-A4、AR651W、AR651W-8P、AR657W、AR6120、AR6120-VW、AR6121、AR6121E、AR6121K,仅支持同款型间扩容。
  • 响应示例 返回状态码为200:正常响应返回体,返回的TNP信息中仅包含对应的ID,响应体参考TnpResponse。 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" : "", "success" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ], "fail" : [ { "errcode" : "error", "errmsg" : "error message", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } } ] } 返回状态码为204:执行成功,没有数据。 HTTP/1.1 204 No Content 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 返回状态码为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 返回状态码为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的示例 POST /controller/campus/v1/sdwan/net/transport-network-ports/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 { "multipleSubIfEnabled" : false, "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "enhancedMode" : false, "enableNtpAutoClient" : false, "tnps" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ] }
  • 响应参数 返回状态码为200:查询TNP成功,响应体参考QueryTnpResponse。 表2 QueryTnpResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总的数据条数。 200 pageSize int32 - - 分页数。 20 pageIndex int32 - - 当前页数 1 multipleSubIfEnabled boolean true false - 支持多子接口 false enhancedMode boolean true false - 增强模式 false urlLinkEnabled boolean true false - 站点是否URL开局 false data ARRAY_REFERENCE 0-512个列表项,详细请参见表18。 TNP信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:查询TNP成功,响应体参考QueryTnpResponse。 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" : "", "totalRecords" : 200, "pageSize" : 20, "pageIndex" : 1, "multipleSubIfEnabled" : false, "enhancedMode" : false, "urlLinkEnabled" : false, "data" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ] } 返回状态码为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 返回状态码为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 /controller/campus/v1/sdwan/net/transport-network-ports?tnpId=00000000-0000-0000-0000-000000000000&siteId=00000000-0000-0000-0000-000000000000&deviceId=00000000-0000-0000-0000-000000000000&pageIndex=1&pageSize=20 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
  • URI /controller/campus/v1/sdwan/net/transport-network-ports 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 tnpId 否 uuid - - 传输网络端口ID,uuid格式。查询具有指定tnpId的TNP信息。 "00000000-0000-0000-0000-000000000000" siteId 是 uuid - - 站点ID,uuid格式。查询指定siteId下的全部TNP信息。 "00000000-0000-0000-0000-000000000000" deviceId 否 uuid - - 设备ID,uuid格式。查询对应设备下的全部TNP信息。 "00000000-0000-0000-0000-000000000000" pageIndex 否 int32 - 1 当前页数,默认是1。 1 pageSize 否 int32 - 20 每页显示的总条数,默认是20。 20
  • 响应示例 返回状态码为201:创建TNP成功,响应体参考TnpResponse。 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 { "errcode" : "0", "errmsg" : "", "success" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ], "fail" : [ { "errcode" : "error", "errmsg" : "error message", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } } ] } 返回状态码为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 返回状态码为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
  • 接口约束 1、该接口仅支持租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用。 2、删除开局TNP后,若不想重新开局,需清除WAN业务。清除WAN业务后,将设备恢复开局配置再重新配置TNP,否则可能存在控制器和设备配置不一致的冲突。 3、如果TNP有重建需求,建议设置自定义的vrf和rd。 4、双网关场景需要同步删除两个网关下的TNP。 5、单次操作仅支持创建一个站点的数据。 6、新建TNP时,Eth-Trunk的范围是1~63。 7、FW网关设备仅支持GE、XGE、LTE、Eth-Trunk等接口开局。 8、FW网关设备从V600R024C00及以上版本支持IPv6。 9、FW网关设备从V600R024C00及以上版本支持PPPOE协议。 10、FW网关设备从V600R024C00版本开始支持开启IPv4 Overlay隧道。 11、FW网关设备不支持与网关AR设备混合开局。 12、FW网关设备不支持与FW非网关设备混合开局。 13、FW网关设备不支持DHCP开局模式。 14、iMaster NCE-Campus V300R024C10版本之前开局的V300系列设备默认按照原始IP进行限速,如果需要按照WAN接口实际发出报文限速,需要使能内环隧道带宽统计开销开关。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/net/transport-network-ports 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 { "multipleSubIfEnabled" : false, "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "enhancedMode" : false, "enableNtpAutoClient" : false, "tnps" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ] }
  • 接口约束 1、该接口仅支持租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用。 2、该接口是全量更新,以最后一次入参为准进行覆盖。 3、以下属性创建后不支持修改:siteId,deviceId,portId,inSubInterface,underlayVrf,routingDistinguisher,如需修改,请删除TNP重新创建。V300版本设备邮件开局时,修改vlanId,ipconnection需要重新开局才能生效。 4、interLink不支持通过此接口修改,如需修改请使用URL:/controller/campus/v1/sdwan/net/site/interlink。 5、单次操作仅支持修改一个站点的数据。 6、FW网关设备从V600R024C00及以上版本支持IPv6。 7、FW网关设备从V600R024C00及以上版本支持PPPOE协议。 8、FW网关设备从V600R024C00版本开始支持开启IPv4 Overlay隧道。
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/net/transport-network-ports 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 { "multipleSubIfEnabled" : false, "interLink" : { "type" : "l3-interface", "enableGre" : false, "vlanMin" : 4000, "vlanMax" : 4008, "extendVlans" : ["1:9"], "portPairs" : [ { "device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device1PortType" : "GE", "device1PortNum" : "0/0/1", "device1PortAddress" : "192.168.101.1", "device1PortMask" : 24, "device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb", "device2PortType" : "GE", "device2PortNum" : "0/0/1", "device2PortAddress" : "192.168.101.1", "device2PortMask" : 24 } ], "mtu" : 1500, "mss" : 1200 }, "enhancedMode" : false, "enableNtpAutoClient" : false, "tnps" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ] }
  • 响应示例 返回状态码为200:修改TNP成功,响应体参考TnpResponse。 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" : "", "success" : [ { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } ], "fail" : [ { "errcode" : "error", "errmsg" : "error message", "data" : { "id" : "00000000-0000-0000-0000-000000000000", "name" : "Link1", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "portId" : "00000000-0000-0000-0000-000000000000", "portType" : 1, "portNum" : "0/0/1", "enable5G" : "", "inSubInterface" : false, "vlanId" : 1, "subInterfaceNumber" : 1, "tnplinkInfo" : { "cellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "standbyCellularEnable" : false, "standbyCellular" : { "apn" : "abc", "userName" : "user1", "userKey" : "******", "authType" : 0, "priority" : 100, "trackEnable" : false, "nqaInfo" : { "destAddress" : "192.168.1.1" } }, "simSwitchBackEnable" : false, "simSwitchBackTime" : 60, "atm" : { "pvcVpi" : 123, "pvcVci" : 123 } }, "ipConnection" : { "ipv4" : { "publicIP" : "192.168.1.1", "accessType" : "PPPoE", "ipMode" : "Static", "customerAddress" : "192.168.1.1", "prefixLength" : 24, "providerAddress" : "192.168.1.1", "peerIp" : "192.168.1.1", "userName" : "admin", "userKey" : "******", "authType" : 0, "dlci" : 55, "interfaceMode" : 0 }, "ipv6" : { "accessType" : "IPoE", "ipMode" : "Static", "customerIPv6Address" : "fc00:3::1", "ipv6PrefixLength" : 64, "providerIpv6Address" : "fc00:3::1", "linkIpv6Pd" : "sdwanprefix", "linkIpv6PdAddr" : "fc00:3::1/64", "linkDhcpv6Option16Type" : "ascii", "linkDhcpv6Option16" : "101068,0001", "linkDhcpv6Pd" : "sdwanprefix", "enableIPv6AcSouthAccess" : true, "ipv6AcSouthAccessId" : "00000000-0000-0000-0000-000000000003", "ipv6MailUsedSouthAccess" : false, "ipv6AccessPreference" : "low" } }, "transportNetworkInfo" : { "transportNetworkId" : "00000000-0000-0000-0000-000000000000", "workMode" : "active", "sendAlarmEnabled" : false }, "ntp" : [ { "id" : "00000000-0000-0000-0000-000000000000", "ntpType" : "IPv6", "preferEn" : false, "serverIP" : "fc00:3::1", "authentication" : false, "mode" : "HMAC-SHA256", "authKey" : "******", "authId" : 10 } ], "attributes" : { "inputBandwidth" : 1000, "outputBandwidth" : 1000, "mtu" : 1500, "TCPmss" : 1200, "ipv6Mtu" : 1500 }, "description" : "site tnp", "natEnable" : false, "ztpMode" : 0, "ipv6ZtpMode" : 0, "underlayVrf" : "underlay_1", "routingDistinguisher" : "1111:1111", "clearDeviceConfig" : true, "enableOverlay" : true, "enableIpv6Overlay" : false, "acSouthAccessId" : "00000000-0000-0000-0000-000000000001", "mailUsedSouthAccess" : false, "linkInformation" : "link1", "accessPreference" : "low", "enableSecondSouthAccess" : false, "secondSouthAccess" : { "acSouthAccessId" : "00000000-0000-0000-0000-000000000002", "accessPreference" : "low" }, "syncModifyDeviceUrlConfig" : false, "enableLoopbackSrcInterface" : false, "enableRu" : false, "disableDefaultRuRoute" : false } } ] } 返回状态码为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 返回状态码为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