List Virtual Switches

List Virtual Switches

Returns information about all Distributed virtual switches based on the request parameters.

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

Local Id of the virtual switch

string
cursor
Optional

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

string
discovered_node_id
Optional

Discovered node ID

string
display_name
Optional

Display name of the virtual switch

string
external_id
Optional

External id of the virtual switch

string
included_fields
Optional

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

string
origin_id
Optional

ID of the compute manager

integer
page_size
Optional
Constraints: minimum: 0 maximum: 1000 default: 1000

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

string
uuid
Optional

UUID of the switch


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns DistributedVirtualSwitchListResult of type(s) application/json
This response body class contains all of the following: InlineDistributedVirtualSwitchListResult1
{
    "_links": [
        {
            "action": "string",
            "href": "string",
            "rel": "string"
        }
    ],
    "_schema": "string",
    "_self": {},
    "cursor": "string",
    "result_count": 0,
    "sort_ascending": false,
    "sort_by": "string",
    "results": [
        {
            "_links": [
                {
                    "action": "string",
                    "href": "string",
                    "rel": "string"
                }
            ],
            "_schema": "string",
            "_self": {},
            "_last_sync_time": 0,
            "description": "string",
            "display_name": "string",
            "resource_type": "string",
            "scope": [
                {
                    "scope_id": "string",
                    "scope_type": "string"
                }
            ],
            "tags": [
                {
                    "scope": "string",
                    "tag": "string"
                }
            ],
            "cm_local_id": "string",
            "external_id": "string",
            "origin_id": "string",
            "origin_type": "string",
            "owner_nsx": "string",
            "discovered_nodes": [
                {
                    "_links": [
                        {
                            "action": "string",
                            "href": "string",
                            "rel": "string"
                        }
                    ],
                    "_schema": "string",
                    "_self": {},
                    "_last_sync_time": 0,
                    "description": "string",
                    "display_name": "string",
                    "resource_type": "string",
                    "scope": [
                        {
                            "scope_id": "string",
                            "scope_type": "string"
                        }
                    ],
                    "tags": [
                        {
                            "scope": "string",
                            "tag": "string"
                        }
                    ],
                    "boot_bank_volume_details": [
                        {
                            "capacity": "string",
                            "name": "string",
                            "type": "string"
                        }
                    ],
                    "certificate": "string",
                    "cm_local_id": "string",
                    "external_id": "string",
                    "hardware_id": "string",
                    "ip_addresses": [
                        "string"
                    ],
                    "node_type": "string",
                    "origin_id": "string",
                    "origin_properties": [
                        {
                            "key": "string",
                            "value": "string"
                        }
                    ],
                    "os_type": "string",
                    "os_version": "string",
                    "owner_nsx": "string",
                    "parent_compute_collection": "string",
                    "patch_level": "string",
                    "pnic_details": [
                        {
                            "device": "string",
                            "dpu_id": "string"
                        }
                    ],
                    "stateless": false
                }
            ],
            "dpu_failover_policy": {
                "active_uplinks": [
                    "string"
                ],
                "standby_uplinks": [
                    "string"
                ]
            },
            "lacp_group_configs": [
                {
                    "key": "string",
                    "load_balance_algorithm": "string",
                    "mode": "string",
                    "name": "string",
                    "timeout_type": "string",
                    "uplink_names": [
                        "string"
                    ],
                    "uplink_num": 0,
                    "uplink_port_keys": [
                        "string"
                    ]
                }
            ],
            "network_offload_spec_id": "string",
            "origin_properties": [
                {
                    "key": "string",
                    "value": "string"
                }
            ],
            "real_time_config": {
                "allowed": false,
                "lan_annotations": [
                    {
                        "key": "string",
                        "value": "string"
                    }
                ]
            },
            "uplink_port_names": [
                "string"
            ],
            "uplink_portgroup": {
                "backing_type": "string",
                "key": "string",
                "overall_status": "string"
            },
            "uuid": "string"
        }
    ]
}

400
Returns BadRequest of type(s) application/json
Operation doesn't return any data structure

403
Returns Forbidden of type(s) application/json
Operation doesn't return any data structure

404
Returns NotFound of type(s) application/json
Operation doesn't return any data structure

412
Returns PreconditionFailed of type(s) application/json
Operation doesn't return any data structure

500
Returns InternalServerError of type(s) application/json
Operation doesn't return any data structure

503
Returns ServiceUnavailable of type(s) application/json
Operation doesn't return any data structure

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/fabric/virtual-switches