华为乾坤-条件查询端口资源:响应示例

时间:2025-02-17 11:36:19

响应示例

返回状态码为200:端口资源查询成功。

HTTP/1.1 200 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
	"code" : 0,
	"data" : [
		{
			"neip" : "10.136.252.60",
			"nename" : "FW_B",
			"nedn" : "047f72d1-7ad3-11e9-b906-000c29b01448",
			"portdn" : "047f72d1-7ad3-11e9-b906-000c29b01448,FR=1,S=1,SS=-1,PP=|1025|0|GigabitEthernet1/0/0",
			"framedn" : "047f72d1-7ad3-11e9-b906-000c29b01448,FR=1",
			"slotdn" : "047f72d1-7ad3-11e9-b906-000c29b01448,FR=1,S=1",
			"subslotdn" : "-1",
			"frameno" : 1,
			"slotno" : 1,
			"subslotno" : -1,
			"portindex" : 67387406,
			"portno" : 0,
			"descr" : "Port",
			"name" : "GigabitEthernet1/0/0",
			"adminstatus" : 1,
			"operstatus" : 2,
			"ifindex" : 6,
			"iftype" : 2,
			"ipaddress" : "10.0.0.0",
			"ifspeed" : "1000000000"
		}
	],
	"pageSize" : 1,
	"totalSize" : 100,
	"description" : "查询成功。"
}

返回状态码为400:参数错误。

HTTP/1.1 400 Bad Request
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

返回状态码为404:rest接口没找到。

HTTP/1.1 404 Not Found
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

返回状态码为500:默认ServiceException异常码,应用内部错误。

HTTP/1.1 500 Internal Server Error
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001186695644.html