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
| Property | Type | Description |
|---|---|---|
result.method | number | The method ID that generated this result. |
result.code | number | The result code. See Result Codes. |
result.timing | number | The measured time for the method call in milliseconds. |
result.timestamp | string | The timestamp in seconds of when the call was made. |
result.video_cards | array<string> | Model names of installed video adapters. |
result.network_adapters | array<object> | An array of information on installed network adapters. |
result.network_adapters.description | string | (optional) Model name of installed network adapter. |
result.network_adapters.adapter_enabled | boolean | Indicates whether the adapter is enabled or not. |
result.network_adapters.media_state | string | (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_address | string | Media Access Control (MAC) address of the network adapter. |
result.network_adapters.ipv4_addresses | array<string> | (optional) Array of IPv4 addresses associated with the current network adapter. |
result.network_adapters.ipv6_addresses | array<string> | (optional) Array of IPv6 addresses associated with the current network adapter. |
result.network_adapters.dhcp_enabled | boolean | (optional) DHCP enabled state of installed network adapter. |
result.network_adapters.subnet_masks | array<string> | (optional) Array of all of the subnet masks associated with the current network adapter. |
result.network_adapters.dhcp_lease_obtained | string | (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_expires | string | (optional) The expiration timestamp for a leased IP address that was assigned to the computer by the DHCP server. |
result.network_adapters.dhcp_server_address | string | (optional) IP address of the dynamic host configuration protocol (DHCP) server. |
result.network_adapters.default_gateways | array<string> | (optional) Array of IP addresses of default gateways that the computer system uses. |
result.network_adapters.dns_server_addresses | array<string> | (optional) Array of server IP addresses to be used in querying for DNS servers. |
result.volumes.paths | array<string> | The paths at which the given volume is mounted. Paths can refer to both drive letters, and nested mount points. |
result.volumes.type | string | Type 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.accessible | boolean | Indicates 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.interface | string | The 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.removable | boolean | (optional) Indicates whether the volume is removable (true) or not (false). |
result.volumes.location | string | (optional) Indicates the device location. |
Result Codes
| Code | Name | Description |
|---|---|---|
| 0 | WAAPI_OK | The 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