コマンド例の :id となっている箇所は、実際の Computer の ID に置き換えてください。
curl -X GET \\
-H 'Content-Type: application/json' \\
-H "Session-Token: xxxxxxxxxxx" \\
-H "App-Token: xxxxxxxxxxx" \\
'[<http://path/to/glpi/apirest.php/Computer/:id?with_networkports=true>](<http://path/to/glpi/apirest.php/Computer/:id?with_networkports=true>)'
"NetworkPortWifi": [
{
"netport_id": 94,
"entities_id": 0,
"is_recursive": 0,
"logical_number": 1,
"name": "Wi-Fi",
"mac": "8a:01:4d:xx:xx:xx",
(省略)
"FQDN": {
"id": 0,
"name": null,
"fqdn": null
},
"IPAddress": [
{
"id": "78",
"name": "192.168.10.xxx,
"IPNetwork": [
{
"id": 2,
"completename": "[192.168.10.0/255.255.255.0](<http://192.168.10.0/255.255.255.0>) - 192.168.10.1",
"name": "[192.168.10.0/255.255.255.0](<http://192.168.10.0/255.255.255.0>) - 192.168.10.1",
"address": "192.168.10.0",
"netmask": "255.255.255.0",
"gateway": "192.168.10.1",
"ipnetworks_id": 0,
"comment": null
}
]
}
... (省略) ...
]
メモリ容量は MB 単位で表示されます。
curl -X GET \\
-H 'Content-Type: application/json' \\
-H "Session-Token: xxxxxxxxxxx" \\
-H "App-Token: xxxxxxxxxxx" \\
'[<http://path/to/glpi/apirest.php/Computer/:id/Item_DeviceMemory/>](<http://path/to/glpi/apirest.php/Computer/:id/Item_DeviceMemory/>)'
"id": 1,
"items_id": 2,
"itemtype": "Computer",
"devicememories_id": 1,
"size": 16384, ← メモリ容量
"serial": null,
"is_deleted": 0,
"is_dynamic": 1,
"entities_id": 0,
"is_recursive": 0,
"busID": "0",
"otherserial": null,
"locations_id": 1,
"states_id": 0,
容量は MB 単位で表示されます。GB に換算する際は 1024 で割ってください。
curl -X GET \\
-H 'Content-Type: application/json' \\
-H "Session-Token: xxxxxxxxxxx" \\
-H "App-Token: xxxxxxxxxxx" \\
'[<http://path/to/glpi/apirest.php/Computer/:id?with_disks=true>](<http://path/to/glpi/apirest.php/Computer/:id?with_disks=true>)'
"name": {
"fsname": "NTFS",
"id": 1,
"entities_id": 0,
"itemtype": "Computer",
"name": "Windows",
"device": "Windows",
"mountpoint": "C:",
"filesystems_id": 14,
"totalsize": 121086, ← ディスクの総容量
"freesize": 89272, ← ディスク空き容量
"is_dynamic": 1,
"encryption_status": 0,
"encryption_tool": "BitLocker",
"encryption_algorithm": "None",
...
(省略)
...
}
},