@@ -325,6 +325,64 @@ Response
325325 .. literalinclude :: ../api_samples/endpoint/endpoint-instance-show-resp.json
326326 :language: javascript
327327
328+ Get Endpoint VM Inventory
329+ =========================
330+
331+ .. rest_method :: GET /endpoints/{endpoint_id}/inventory
332+
333+ Exports the full VM inventory of an endpoint as a CSV file.
334+
335+ **Preconditions **
336+
337+ The endpoint must exist and the platform must support inventory export.
338+
339+ Normal response codes: 200
340+
341+ Error response codes: unauthorized(401), forbidden(403),
342+ itemNotFound(404)
343+
344+ Request
345+ -------
346+
347+ .. rest_parameters :: parameters.yaml
348+
349+ - endpoint_id : endpoint_id_path
350+ - env : inventory_source_env
351+
352+ Response
353+ --------
354+
355+ The response body is a UTF-8 encoded CSV file with the following columns:
356+
357+ - **vm_id ** – Unique identifier (UUID) of the VM.
358+ - **vm_name ** – Display name of the VM.
359+ - **guest_id ** – Raw VMware guest OS identifier (e.g. ``ubuntu64Guest ``).
360+ - **firmware ** – Firmware type (``bios `` or ``efi ``).
361+ - **num_cpu ** – Number of vCPUs.
362+ - **memory_mb ** – Memory in megabytes.
363+ - **nested_virtualization ** – Whether nested virtualisation is enabled.
364+ - **dynamic_memory_enabled ** – Whether dynamic memory is enabled.
365+ - **secure_boot ** – Whether EFI Secure Boot is enabled.
366+ - **os_type ** – Coriolis-normalised OS type (e.g. ``linux ``, ``windows ``).
367+ - **disks ** – Semicolon-separated list of disk sizes (e.g. ``100GB; 50GB ``).
368+ - **nics ** – Semicolon-separated list of NIC entries, each formatted as
369+ ``label|mac[|network[|ip1,ip2,...]] ``.
370+ - **boot_order ** – Semicolon-separated boot device list. May be empty if the
371+ provider does not populate boot order information.
372+ - **hostname ** – Guest hostname as reported by VMware Tools (empty if tools
373+ are not running).
374+ - **parent_vapp ** – Name of the parent vApp, if any.
375+ - **host ** – ESXi host the VM is currently running on.
376+ - **power_state ** – Current power state (e.g. ``poweredOn ``, ``poweredOff ``).
377+
378+ The response is returned with ``Content-Type: text/csv `` and a
379+ ``Content-Disposition: attachment `` header suggesting a filename of the form
380+ ``vm_inventory_{endpoint_id}.csv ``.
381+
382+ **Example VM Inventory CSV Response **
383+
384+ .. literalinclude :: ../api_samples/endpoint/endpoint-inventory-resp.csv
385+
328386Get Endpoint Destination Options
329387================================
330388
0 commit comments