List Virtual Machines

List Virtual Machines

Returns information about all virtual machines.

Request
URI
GET
https://nsxmanager.your.domain/api/v1/fabric/virtual-machines
COPY
Query Parameters
string
cursor
Optional

Opaque cursor to be used for getting next page of records (supplied by current result page)

string
display_name
Optional

Display Name of the virtual machine

string
external_id
Optional

External id of the virtual machine

string
host_id
Optional

Id of the host where this vif is located

string
included_fields
Optional

Comma separated list of fields that should be included in query result

integer
page_size
Optional

Maximum number of results to return in this page (server may return fewer)

boolean
sort_ascending
Optional

sort_ascending

string
sort_by
Optional

Field by which records are sorted


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns VirtualMachineListResult of type(s) application/json
This response body class contains all of the following: ListResult , InlineVirtualMachineListResult1
{
    "_self": {
        "action": "string",
        "href": "string",
        "rel": "string"
    },
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_schema": "string",
    "cursor": "string",
    "sort_ascending": false,
    "sort_by": "string",
    "result_count": 0,
    "results": [
        {
            "_self": {
                "action": "string",
                "href": "string",
                "rel": "string"
            },
            "_links": [
                {
                    "action": "string",
                    "href": "string",
                    "rel": "string"
                }
            ],
            "_schema": "string",
            "_last_sync_time": 0,
            "display_name": "string",
            "description": "string",
            "resource_type": "string",
            "tags": [
                {
                    "scope": "string",
                    "tag": "string"
                }
            ],
            "source": {
                "target_display_name": "string",
                "is_valid": false,
                "target_id": "string",
                "target_type": "string"
            },
            "local_id_on_host": "string",
            "type": "string",
            "power_state": "string",
            "compute_ids": [
                "string"
            ],
            "host_id": "string",
            "external_id": "string"
        }
    ]
}

400
Returns BadRequest of type(s) application/json
This response body class contains all of the following: RelatedApiError , InlineApiError1
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0,
    "details": "string",
    "related_errors": [
        {
            "module_name": "string",
            "error_message": "string",
            "error_code": 0,
            "details": "string"
        }
    ]
}

403
Returns Forbidden of type(s) application/json
This response body class contains all of the following: RelatedApiError , InlineApiError1
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0,
    "details": "string",
    "related_errors": [
        {
            "module_name": "string",
            "error_message": "string",
            "error_code": 0,
            "details": "string"
        }
    ]
}

404
Returns NotFound of type(s) application/json
This response body class contains all of the following: RelatedApiError , InlineApiError1
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0,
    "details": "string",
    "related_errors": [
        {
            "module_name": "string",
            "error_message": "string",
            "error_code": 0,
            "details": "string"
        }
    ]
}

412
Returns PreconditionFailed of type(s) application/json
This response body class contains all of the following: RelatedApiError , InlineApiError1
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0,
    "details": "string",
    "related_errors": [
        {
            "module_name": "string",
            "error_message": "string",
            "error_code": 0,
            "details": "string"
        }
    ]
}

500
Returns InternalServerError of type(s) application/json
This response body class contains all of the following: RelatedApiError , InlineApiError1
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0,
    "details": "string",
    "related_errors": [
        {
            "module_name": "string",
            "error_message": "string",
            "error_code": 0,
            "details": "string"
        }
    ]
}

503
Returns ServiceUnavailable of type(s) application/json
This response body class contains all of the following: RelatedApiError , InlineApiError1
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0,
    "details": "string",
    "related_errors": [
        {
            "module_name": "string",
            "error_message": "string",
            "error_code": 0,
            "details": "string"
        }
    ]
}