分页获取设备列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListDevices

系统规定参数。取值:ListDevices。

MaxResults Integer 10

返回结果的最大个数。

NextToken String 1

当总结果个数大于MaxResults时,用于翻页的token。

DeviceFormId String form-u4ilnhu64h026lrf

设备形态ID。

DeviceFormName String 网络设备

设备形态名称。

PhysicalSpaceId String space-ez6zd3w68ma4fsd4

物理空间ID。

HostName Array of String HZYT_****

设备主机名。

Ip Array of String 127.0.**.***

设备IP。

Sn Array of String 2022*****

设备SN。

Mac Array of String 01:1b***

设备MAC。

Vendor Array of String Alibaba

设备厂商。

Model Array of String SAG-1000

设备型号。

ServiceStatus Array of String one

设备服务状态。

SecurityDomain Array of String CMN-XA07

安全域。

ExtAttributes String {"role":"ASW"}

设备额外属性。

InstanceId String cmn-cn-xxx

实例ID。

Keyword String G1QH55J******

模糊查询值。

PhysicalSpaceIds Array of String space-ez6zd3w68ma4fsd4

物理空间ID。

DeviceIds Array of String device-2nq3str0d65rxdp6

设备ID。

CalculateAmount Boolean true

是否统计。

返回数据

名称 类型 示例值 描述
TotalCount Integer 100

总记录数。

NetworkCoefficient Integer 1

网络设备系数。

ServerCoefficient Integer 1

服务器系数。

IotCoefficient Integer 1

IOT系数。

OtherCoefficient Integer 1

其他设备系数。

NetworkMaintenanceCoefficient Integer 1

网络设备维保系数。

ServerMaintenanceCoefficient Integer 1

服务器维保系数。

AmountDetail String {"networkOnlineCount":11,"serverOnlineCount":7,"iotOnlineCount":2,"otherOnlineCount":0,"networkMaintainCount":0,"serverMaintainCount":0,"iotMaintainCount":0,"otherMaintainCount":0,"networkUdfStatusCount":5,"serverUdfStatusCount":0,"iotUdfStatusCount":0,"otherUdfStatusCount":0,"ratioNetworkCount":16,"ratioServerCount":3,"ratioIotCount":0,"ratioOtherCount":0}

设备明细。

RequestId String fdb2af01-bd56-4034-812b-f257f73b4690

请求ID。

NextToken Integer 10

当总结果个数大于MaxResults时,用于翻页的token。

Devices Array of content

设备列表。

DeviceId String device-evve560juend5owh

设备ID。

DeviceFormName String 网络设备

设备形态名称。

DeviceFormId String form-u4ilnhu64h026lrf

设备形态ID。

PhysicalSpaceId String space-ez6zd3w68ma4fsd4

物理空间ID。

PhysicalSpaceName String 阿里巴巴西溪园区

物理空间名称。

HostName String HZYT_****

设备名。

Ip String 127.0.**.***

设备IP。

Sn String 2022*****

设备SN。

Mac String 01:1b***

设备MAC地址。

Vendor String Alibaba

设备厂商。

Model String SAG-1000

设备型号。

SecurityDomain String IT

设备安全域。

ServiceStatus String online

设备状态。

LoginType String SSH,TELNET

登录类型。

LoginUsername String admin

登录账号。

LoginPassword String pass****

登录密码。

EnablePassword String pass****

Enable密码。

SnmpAccountVersion String v3

SNMP 版本,支持v1,v2c,v3。

SnmpCommunity String pass****

团体字,SNMP v1和v2c需要。

SnmpAccountType String get

SNMP 账号类型。

SnmpSecurityLevel String AUTH_PRIV

SNMP安全级别,SNMP v3需要。

SnmpUsername String admin

用户名,SNMP v3需要。

SnmpAuthPassphrase String pass****

用户认证密码,SNMP v3需要。

SnmpAuthProtocol String MD5

用户认证协议,SNMP v3需要。

SnmpPrivacyPassphrase String pass****

用户加密密码,SNMP v3需要。

SnmpPrivacyProtocol String DES

用户加密协议,SNMP v3需要。

ExtAttributes String {"role":"ASW"}

设备额外属性。

GmtCreate String 2022-11-08 09:00:58

创建时间。

GmtModified String 2023-01-16 09:43:20

修改时间。

MaxResults Integer 10

每页数量。

AmountUsed Integer 10

已使用配额。

示例

请求示例

http(s)://[Endpoint]/?Action=ListDevices
&MaxResults=10
&NextToken=1
&DeviceFormId=form-u4ilnhu64h026lrf
&DeviceFormName=网络设备
&PhysicalSpaceId=space-ez6zd3w68ma4fsd4
&HostName=["HZYT_****"]
&Ip=["127.0.**.***"]
&Sn=["2022*****"]
&Mac=["01:1b***"]
&Vendor=["Alibaba"]
&Model=["SAG-1000"]
&ServiceStatus=["one"]
&SecurityDomain=["CMN-XA07"]
&ExtAttributes={"role":"ASW"}
&InstanceId=cmn-cn-xxx

&Keyword=G1QH55J******
&PhysicalSpaceIds=["space-ez6zd3w68ma4fsd4"]
&DeviceIds=["device-2nq3str0d65rxdp6"]
&CalculateAmount=true
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ListDevicesResponse>
    <TotalCount>100</TotalCount>
    <NetworkCoefficient>1</NetworkCoefficient>
    <ServerCoefficient>1</ServerCoefficient>
    <IotCoefficient>1</IotCoefficient>
    <OtherCoefficient>1</OtherCoefficient>
    <NetworkMaintenanceCoefficient>1</NetworkMaintenanceCoefficient>
    <ServerMaintenanceCoefficient>1</ServerMaintenanceCoefficient>
    <AmountDetail>{"networkOnlineCount":11,"serverOnlineCount":7,"iotOnlineCount":2,"otherOnlineCount":0,"networkMaintainCount":0,"serverMaintainCount":0,"iotMaintainCount":0,"otherMaintainCount":0,"networkUdfStatusCount":5,"serverUdfStatusCount":0,"iotUdfStatusCount":0,"otherUdfStatusCount":0,"ratioNetworkCount":16,"ratioServerCount":3,"ratioIotCount":0,"ratioOtherCount":0}</AmountDetail>
    <RequestId>fdb2af01-bd56-4034-812b-f257f73b4690</RequestId>
    <NextToken>10</NextToken>
    <Devices>
        <DeviceId>device-evve560juend5owh</DeviceId>
        <DeviceFormName>网络设备</DeviceFormName>
        <DeviceFormId>form-u4ilnhu64h026lrf</DeviceFormId>
        <PhysicalSpaceId>space-ez6zd3w68ma4fsd4</PhysicalSpaceId>
        <PhysicalSpaceName>阿里巴巴西溪园区</PhysicalSpaceName>
        <HostName>HZYT_****
</HostName>
        <Ip>127.0.**.***
</Ip>
        <Sn>2022*****
</Sn>
        <Mac>01:1b***</Mac>
        <Vendor>Alibaba</Vendor>
        <Model>SAG-1000
</Model>
        <SecurityDomain>IT</SecurityDomain>
        <ServiceStatus>online</ServiceStatus>
        <LoginType>SSH,TELNET</LoginType>
        <LoginUsername>admin</LoginUsername>
        <LoginPassword>pass****
</LoginPassword>
        <EnablePassword>pass****</EnablePassword>
        <SnmpAccountVersion>v3</SnmpAccountVersion>
        <SnmpCommunity>pass****
</SnmpCommunity>
        <SnmpAccountType>get</SnmpAccountType>
        <SnmpSecurityLevel>AUTH_PRIV</SnmpSecurityLevel>
        <SnmpUsername>admin</SnmpUsername>
        <SnmpAuthPassphrase>pass****
</SnmpAuthPassphrase>
        <SnmpAuthProtocol>MD5</SnmpAuthProtocol>
        <SnmpPrivacyPassphrase>pass****
</SnmpPrivacyPassphrase>
        <SnmpPrivacyProtocol>DES</SnmpPrivacyProtocol>
        <ExtAttributes>{"role":"ASW"}</ExtAttributes>
        <GmtCreate>2022-11-08 09:00:58</GmtCreate>
        <GmtModified>2023-01-16 09:43:20</GmtModified>
    </Devices>
    <MaxResults>10</MaxResults>
    <AmountUsed>10</AmountUsed>
</ListDevicesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 100,
  "NetworkCoefficient" : 1,
  "ServerCoefficient" : 1,
  "IotCoefficient" : 1,
  "OtherCoefficient" : 1,
  "NetworkMaintenanceCoefficient" : 1,
  "ServerMaintenanceCoefficient" : 1,
  "AmountDetail" : "{\"networkOnlineCount\":11,\"serverOnlineCount\":7,\"iotOnlineCount\":2,\"otherOnlineCount\":0,\"networkMaintainCount\":0,\"serverMaintainCount\":0,\"iotMaintainCount\":0,\"otherMaintainCount\":0,\"networkUdfStatusCount\":5,\"serverUdfStatusCount\":0,\"iotUdfStatusCount\":0,\"otherUdfStatusCount\":0,\"ratioNetworkCount\":16,\"ratioServerCount\":3,\"ratioIotCount\":0,\"ratioOtherCount\":0}",
  "RequestId" : "fdb2af01-bd56-4034-812b-f257f73b4690",
  "NextToken" : 10,
  "Devices" : [ {
    "DeviceId" : "device-evve560juend5owh",
    "DeviceFormName" : "网络设备",
    "DeviceFormId" : "form-u4ilnhu64h026lrf",
    "PhysicalSpaceId" : "space-ez6zd3w68ma4fsd4",
    "PhysicalSpaceName" : "阿里巴巴西溪园区",
    "HostName" : "HZYT_****\n",
    "Ip" : "127.0.**.***\n",
    "Sn" : "2022*****\n",
    "Mac" : "01:1b***",
    "Vendor" : "Alibaba",
    "Model" : "SAG-1000\n",
    "SecurityDomain" : "IT",
    "ServiceStatus" : "online",
    "LoginType" : "SSH,TELNET",
    "LoginUsername" : "admin",
    "LoginPassword" : "pass****\n",
    "EnablePassword" : "pass****",
    "SnmpAccountVersion" : "v3",
    "SnmpCommunity" : "pass****\n",
    "SnmpAccountType" : "get",
    "SnmpSecurityLevel" : "AUTH_PRIV",
    "SnmpUsername" : "admin",
    "SnmpAuthPassphrase" : "pass****\n",
    "SnmpAuthProtocol" : "MD5",
    "SnmpPrivacyPassphrase" : "pass****\n",
    "SnmpPrivacyProtocol" : "DES",
    "ExtAttributes" : "{\"role\":\"ASW\"}",
    "GmtCreate" : "2022-11-08 09:00:58",
    "GmtModified" : "2023-01-16 09:43:20"
  } ],
  "MaxResults" : 10,
  "AmountUsed" : 10
}

错误码

HttpCode 错误码 错误信息 描述
400 Missing%s You must specify the parameter %s. 必填参数没有填。请检查调用时是否填写了此参数,并重试请求。
404 Invalid%s.NotFound The specified resource %s does not exist. 找不到对应资源

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。