Skip to main content

GetPCComponents

Will retrieve list of installed hardware.

Syntax​

Method ID​

#define WAAPI_MID_GET_PC_COMPONENTS 30003

JSON Input Structure​

{
"input": {
"method": 30003
}
}

Input Properties​

This method does not require any additional parameters beyond the method ID.

JSON Output Structure​

{
"result": {
"method": 30003,
"code": number,
"timing": number,
"timestamp": string,
"video_cards": [
string,
...
],
"network_adapters": [
{
"description": string,
"adapter_enabled": boolean,
"media_state": string,
"physical_address": string,
"ipv4_addresses": [
string,
...
],
"ipv6_addresses": [
string,
...
],
"dhcp_enabled": boolean,
"subnet_masks": [
string,
...
],
"dhcp_lease_obtained": string,
"dhcp_lease_expires": string,
"dhcp_server_address": string,
"default_gateways": [
string,
...
],
"dns_server_addresses": [
string,
...
]
},
...
],
"volumes": [
string,
...
]
}
}

Output Properties​

PropertyTypeDescription
result.methodnumberThe method ID that generated this result.
result.codenumberThe result code. See Result Codes.
result.timingnumberThe measured time for the method call in milliseconds.
result.timestampstringThe timestamp in seconds of when the call was made.
result.video_cardsarray<string>Model names of installed video adapters.
result.network_adaptersarray<object>An array of information on installed network adapters.
result.network_adapters.descriptionstring(optional) Model name of installed network adapter.
result.network_adapters.adapter_enabledbooleanIndicates whether the adapter is enabled or not.
result.network_adapters.media_statestring(optional) State of the network adapter connection to the network: 'disconnected', 'connecting', 'connected', 'disconnecting', hardware_not_present', 'hardware_disabled', 'hardware_malfunction', 'media_disconnected', 'authenticating', authentication_succeeded', 'authentication_failed', 'invalid_address', 'credentials_required'
result.network_adapters.physical_addressstringMedia Access Control (MAC) address of the network adapter.
result.network_adapters.ipv4_addressesarray<string>(optional) Array of IPv4 addresses associated with the current network adapter.
result.network_adapters.ipv6_addressesarray<string>(optional) Array of IPv6 addresses associated with the current network adapter.
result.network_adapters.dhcp_enabledboolean(optional) DHCP enabled state of installed network adapter.
result.network_adapters.subnet_masksarray<string>(optional) Array of all of the subnet masks associated with the current network adapter.
result.network_adapters.dhcp_lease_obtainedstring(optional) The timestamp when the lease was obtained for the IP address assigned to the computer by the DHCP server.
result.network_adapters.dhcp_lease_expiresstring(optional) The expiration timestamp for a leased IP address that was assigned to the computer by the DHCP server.
result.network_adapters.dhcp_server_addressstring(optional) IP address of the dynamic host configuration protocol (DHCP) server.
result.network_adapters.default_gatewaysarray<string>(optional) Array of IP addresses of default gateways that the computer system uses.
result.network_adapters.dns_server_addressesarray<string>(optional) Array of server IP addresses to be used in querying for DNS servers.
result.volumes.pathsarray<string>The paths at which the given volume is mounted. Paths can refer to both drive letters, and nested mount points.
result.volumes.typestringType of the device where the volume originates from. Can be either 'Generic Storage', 'Hard Disk', 'Remote', 'CD-ROM', 'Floppy', 'RAM disk', or 'other'.
result.volumes.accessiblebooleanIndicates whether the volume can be accessed (true) or not (false). Useful for determining whether a disk is inside the CD-ROM drive, or if a floppy disk has been inserted.
result.volumes.interfacestringThe bus interface for the device that owns this volume. Can be either 'SCSI', 'ATAPI', 'ATA', 'IEEE 1394', 'SSA', 'Fibre', 'USB', 'RAID', 'iSCSI', 'SAS', 'SATA', 'SD', 'MMC', 'Virtual', 'File-Backed Virtual' or 'other'.
result.volumes.removableboolean(optional) Indicates whether the volume is removable (true) or not (false).
result.volumes.locationstring(optional) Indicates the device location.

Result Codes​

CodeNameDescription
0WAAPI_OKThe operation completed successfully.
note

Other codes may be returned. See the full Result Codes reference for the complete list.

Remarks​

Error Handling​

The results of this function are determined by the error code returned by the call. If successful, WAAPI_OK or a special success code will be returned. Always check both the function return value and the result.code field in the output JSON.

Examples​

Examples will be added here demonstrating the usage of this method.

See Also​


Last updated: 2026-10-01