@@ -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 in CSV format.
334+
335+ **Preconditions **
336+
337+ The endpoint must exist and the provider 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 various columns returned.
356+ Each provider may return more specific fields (i.e. parentVapp when using VMWare).
357+ The example below shows the values returned by the VMWare provider.
358+
359+ - **vm_id ** – Unique identifier (UUID) of the VM.
360+ - **vm_name ** – Display name of the VM.
361+ - **guest_id ** – Raw VMware guest OS identifier (e.g. ``ubuntu64Guest ``).
362+ - **firmware ** – Firmware type (``bios `` or ``efi ``).
363+ - **num_cpu ** – Number of vCPUs.
364+ - **memory_mb ** – Memory in megabytes.
365+ - **nested_virtualization ** – Whether nested virtualisation is enabled.
366+ - **dynamic_memory_enabled ** – Whether dynamic memory is enabled.
367+ - **secure_boot ** – Whether EFI Secure Boot is enabled.
368+ - **os_type ** – Coriolis-normalised OS type (e.g. ``linux ``, ``windows ``).
369+ - **disks ** – Total provisioned disk size for the VM (e.g. ``150GB ``).
370+ - **nics ** – Semicolon-separated list of NIC entries, each formatted as
371+ ``label|mac[|network[|ip1,ip2,...]] ``.
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