{"type":"api","title":"Get Vcenter Vms Info","meta":{"id":"/apps/pubhub/media/nexus-dashboard-api-v1/86cc2501c92a7370499e3d537496e5c722396afb/bd1d3c86-e531-31dc-81ae-49c9907bffa7","info":{"contact":{"name":"Cisco Technical Assistance Center (TAC)","url":"https://developer.cisco.com/docs/nexus-dashboard/latest/#developer-support/"},"description":"Infrastructure APIs are largely used to manage the ND cluster","license":{"name":"Cisco","url":"https://www.cisco.com/site/us/en/about/legal/contract-experience/index.html"},"title":"Nexus Dashboard Infrastructure v1","version":"1.1.136"},"tags":[{"name":"Authentication"},{"name":"System Status"},{"name":"System Settings"},{"name":"Multi-Cluster Connectivity"},{"name":"License Management"},{"name":"Integrations"},{"name":"System Software"},{"name":"Backup and Restore"},{"name":"History and Logs"},{"name":"Tech Support"},{"name":"Users and Security"},{"name":"Certificate Management"},{"name":"Multi Tenancy"},{"name":"System Bootstrap"}],"x-parser-conf":{"overview":{"markdownPath":"reference/overview-infra.md"},"labelConfig":{"endpoint":{"field":"operationId","format":"startCase"}}},"openapi":"3.0.3","servers":[{"description":"Nexus Dashboard Infrastructure APIs","url":"https://{cluster}/api/v1/infra","variables":{"cluster":{"default":"example.com","description":"The cluster URL/IP address","enum":["example.com","10.1.1.20"]}}}],"securitySchemes":{"OAuth2":{"type":"oauth2","description":"OAuth2 security scheme","flows":{"implicit":{"authorizationUrl":"https://example.com/login","scopes":{"observer":"Grants read access","fabric-admin":"Grants write access to fabric resources","support-engineer":"Primarily a role for support engineers to operate the managed resources","super-admin":"Grants access to all operations","approver":"Grants access to approve policies","designer":"Grants access to design policies"}}}},"http_signature":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"HTTP Signature security scheme"},"cookieAuth":{"type":"apiKey","description":"Cookie based authentication","in":"cookie","name":"AuthCookie"}}},"spec":{"description":"Get information of all Virtual Machines in the specified vCenter. Fabric name can be specified as an optional query parameter.","operationId":"getVcenterVmsInfo","parameters":[{"name":"clusterName","description":"Name of the target Nexus Dashboard cluster to execute this API, in a multi-cluster deployment","in":"query","required":false,"schema":{"type":"string","description":"Name of the target Nexus Dashboard cluster to execute this API, in a multi-cluster deployment"},"$$ref":"#/components/parameters/fromClusterQueryParam"},{"name":"integrationId","in":"path","description":"Id of the Integration, Id format is {type}-{ip} or {type}-{name}","required":true,"schema":{"type":"string","description":"The integration id of the cluster or platform"},"examples":{"kubernetes":{"value":"kubernetes-1.1.1.1","summary":"Kubernetes integration ID"},"openshift":{"value":"openshift-1.1.1.1","summary":"OpenShift integration ID"},"vcenter":{"value":"vcenter-1.1.1.1","summary":"vCenter integration ID"},"hypershield":{"value":"hypershield-tenantA","summary":"Hypershield integration ID"},"slackapp":{"value":"slackapp-1234","summary":"Slack integration ID"}},"$$ref":"#/components/parameters/pathIntegrationId"},{"description":"Name of the fabric","in":"query","name":"fabricName","required":false,"schema":{"nullable":true,"type":"string","maxLength":64,"minLength":1},"$$ref":"#/components/parameters/fabricNameOptional"},{"description":"Virtual Machine Instance UUID","example":"50184181-5802-194c-029d-f34779e0caa5","in":"query","name":"vmInstanceUuid","required":false,"schema":{"type":"string"},"$$ref":"#/components/parameters/vmInstanceUuidOptional"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"vms":{"items":{"type":"object","description":"VM information","properties":{"state":{"type":"string","example":"connected","description":"Discovery status","enum":["connected","disconnected"]},"fabricName":{"type":"string","example":"MyFabric","description":"Name of the Fabric","$$ref":"#/components/schemas/schemas-fabricName"},"switchName":{"type":"string","example":"padkrish-9-245","description":"Switch host name","$$ref":"#/components/schemas/switchName"},"computeId":{"type":"string","example":"HostSystem:host-1340","description":"ESX server ID"},"computeName":{"type":"string","example":"ucsEsxi1","description":"ESXi server name"},"vmId":{"type":"string","example":"VirtualMachine:vm-1350","description":"Virtual Machine ID"},"vmName":{"type":"string","example":"WebServer_VM1","description":"Virtual Machine Name given at the vCenter level"},"vmHostname":{"type":"string","example":"webserver.mydomain.com","description":"Hostname of the VM"},"tenantName":{"type":"string","example":"TenantA","description":"Name of the tenant the VM belongs to"},"ipCollections":{"type":"array","nullable":true,"items":{"type":"string","example":"10.1.1.2","description":"IPv4 or IPv6 prefix value. It supports any one of the following: \n10.1.1.2\n10.1.1.0/24\nfe80::4080:741e:1d3c:975f\nfe80::4080/90\n","$$ref":"#/components/schemas/ipPrefix"},"description":"List of IP addresses associated with the VM's vNic"},"macCollections":{"type":"array","nullable":true,"items":{"type":"string","example":"00:30:66:9d:80:69","description":"MAC Address value","$$ref":"#/components/schemas/macAddress"},"description":"List of MAC addresses associated with the VM's vNic"},"vlanId":{"type":"string","example":"61","description":"VLAN value of PortGroup (PG) or Distributed Port Group (DVSPG). For PG, the VLAN options that the user can choose in vCenter and the corresponding value in this field are given below:\nWhen user choses \"None\", this field will have a value of \"0\"\nWhen user configures a value, this field will return the same. Foe example, \"61\"\nFor DVSPG, the VLAN type that the user can choose in vCenter and the the corresponding value in this field are given below:\nWhen user selects the type as \"None\", this field will have a value of \"0\"\nWhen user selects the type as \"Access\" and configures a value, this field will return the same. For example, \"61\"\nWhen user selects the type as \"Trunk\" and configures a range, this field will return the same. For example, \"100-200\"\n"},"vSwitch":{"type":"string","example":"vSwitch3","description":"Name of the vSwitch to which the VM's vNic is associated"},"physicalNic":{"type":"string","example":"vmnic4","description":"Physical Nic in the ESXi server to which the VSwitch of the VM's vNic is associated"},"switchInterfaceName":{"type":"string","example":"Ethernet1/5","description":"Switch interface name","$$ref":"#/components/schemas/switchInterfaceName"},"torName":{"description":"Name of the ToR switch connected to the VM's vNic","type":"string","example":"tor-1","$$ref":"#/components/schemas/torName"},"torInterfaceName":{"description":"Name of the ToR switch interface connected to the VM's vNic","type":"string","example":"Ethernet1/43","$$ref":"#/components/schemas/torInterfaceName"},"torPortChannelId":{"description":"Port Channel ID of the ToR switch interface connected to the VM's vNic","type":"integer","minimum":-1,"maximum":4096,"example":501,"$$ref":"#/components/schemas/vmmTorPortChannelId"},"virtualPortChannelId":{"description":"Virtual Port Channel (VPC) ID of the neighbor switch interface connected to the VM's vNic","type":"integer","minimum":0,"maximum":4096,"example":1,"$$ref":"#/components/schemas/vmmVirtualPortChannelId"},"portChannelId":{"description":"Port Channel ID of the neighbor switch interface connected to the VM's vNic","type":"integer","minimum":-1,"maximum":4096,"example":501,"$$ref":"#/components/schemas/vmmPortChannelId"},"guestOs":{"type":"string","example":"Ubuntu linux (64-bit)","description":"Operating System running in the VM"},"datacenter":{"type":"string","example":"DC1","description":"Datacenter in the vCenter under which the VM is present"},"clusterName":{"type":"string","example":"cluster1","description":"Cluster in the vCenter under which the VM is present"},"cpuUtilization":{"type":"string","example":"8.53GHz","description":"CPU utilization of the VM"},"memoryUtilization":{"type":"string","example":"2.05GB","description":"Memory utilization of the VM"},"diskUsage":{"type":"string","example":"54GB","description":"Disk Utilization of the VM"},"networkState":{"type":"string","example":"connected","description":"Connectivity status with the neighbor switch (Leaf/ToR)","enum":["connected","disconnected"]},"vCenterIp":{"type":"string","example":"192.268.19.45","description":"IP address of the vCenter","$$ref":"#/components/schemas/vCenterIp"},"networkName":{"type":"string","minLength":0,"maxLength":32,"example":"MyNetwork","description":"Name of the Network","$$ref":"#/components/schemas/vmmNetworkName"},"vrfName":{"type":"string","minLength":0,"maxLength":32,"example":"MyVRF","description":"Name of the VRF","$$ref":"#/components/schemas/vmmVrfName"},"securityGroupIds":{"type":"array","nullable":true,"items":{"type":"integer","minimum":-1,"maximum":65535,"example":108,"description":"Security Group ID","$$ref":"#/components/schemas/vmmSecurityGroupId"},"description":"List of Security Group ID's associated with each IP address of the vNic"},"securityGroupNames":{"type":"array","nullable":true,"items":{"type":"string","minLength":0,"maxLength":115,"example":"tenantSales~SG_10000","pattern":"^[A-Za-z0-9!@#$^=+{}.:~_-]*$","description":"Security Group name","$$ref":"#/components/schemas/vmmSecurityGroupName"},"description":"List of Security Group Names associated with each IP address of the vNic"},"configuredSecurityGroupId":{"type":"integer","minimum":-1,"maximum":65535,"example":108,"description":"Security Group ID","$$ref":"#/components/schemas/vmmSecurityGroupId"},"configuredSecurityGroupName":{"type":"string","minLength":0,"maxLength":115,"example":"tenantSales~SG_10000","pattern":"^[A-Za-z0-9!@#$^=+{}.:~_-]*$","description":"Security Group name","$$ref":"#/components/schemas/vmmSecurityGroupName"},"vmNicName":{"type":"string","example":"Network adapter 1","description":"Name of the VM's vNic","$$ref":"#/components/schemas/vmNicName"},"portGroupName":{"type":"string","example":"DualPort_PG50","description":"Port Group associated with the VM's vNic","$$ref":"#/components/schemas/portGroupName"},"distributedPortGroupName":{"type":"string","example":"DVS_PG_150","description":"Distributed Port Group associated with the VM's vNic","$$ref":"#/components/schemas/distributedPortGroupName"},"vmInstanceUuid":{"type":"string","example":"50184181-5802-194c-029d-f34779e0caa5","description":"UUID of the VM","$$ref":"#/components/schemas/vmInstanceUuid"},"vmVnicId":{"type":"string","example":"172.29.21.19050184181-5802-194c-029d-f34779e0caa500:50:56:98:b6:e4","description":"Unique Key associated with the VM's vNic across all vCenters"},"userAlerts":{"type":"string","example":"IP, VRF modified, please reset the Security Group ID","description":"Alerts that are set when the VM vNic's associated IP address, Network or VRF are modified"}},"$$ref":"#/components/schemas/vCenterVmInfo"},"nullable":true,"type":"array"}},"type":"object"}}},"description":"OK","$$ref":"#/components/responses/getVmsResponse"},"400":{"description":"Bad Request","headers":{"Date":{"description":"Date","example":"Tue, 15 Nov 1994 08:12:31 GMT","schema":{"type":"string","example":"Tue, 15 Nov 1994 08:12:31 GMT","nullable":true},"$$ref":"#/components/headers/Date"},"Cache-Control":{"description":"Cache-Control","example":"no-cache, no-store, must-revalidate","schema":{"type":"string","default":"no-cache","nullable":true},"$$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"description":"Error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"},"errors":{"description":"An array of errors","type":"array","items":{"description":"Sub error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"}},"required":["message","code","description"],"example":{"message":"Invalid email","description":"The email you provided is invalid","code":4066},"$$ref":"#/components/schemas/SubError"}}},"example":{"message":"Unauthorized","description":"You are not authorized to access this resource","code":4065},"required":["message","code","description"],"$$ref":"#/components/schemas/Error"},"example":{"message":"Bad Request","description":"The server could not understand the request due to incorrect syntax.","code":400}}},"$$ref":"#/components/responses/400"},"401":{"description":"Unauthorized","headers":{"Date":{"description":"Date","example":"Tue, 15 Nov 1994 08:12:31 GMT","schema":{"type":"string","example":"Tue, 15 Nov 1994 08:12:31 GMT","nullable":true},"$$ref":"#/components/headers/Date"},"Cache-Control":{"description":"Cache-Control","example":"no-cache, no-store, must-revalidate","schema":{"type":"string","default":"no-cache","nullable":true},"$$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"description":"Error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"},"errors":{"description":"An array of errors","type":"array","items":{"description":"Sub error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"}},"required":["message","code","description"],"example":{"message":"Invalid email","description":"The email you provided is invalid","code":4066},"$$ref":"#/components/schemas/SubError"}}},"example":{"message":"Unauthorized","description":"You are not authorized to access this resource","code":4065},"required":["message","code","description"],"$$ref":"#/components/schemas/Error"},"example":{"message":"Unauthorized","description":"Indicates that the request requires user authentication information.","code":401}}},"$$ref":"#/components/responses/401"},"403":{"description":"Forbidden","headers":{"Date":{"description":"Date","example":"Tue, 15 Nov 1994 08:12:31 GMT","schema":{"type":"string","example":"Tue, 15 Nov 1994 08:12:31 GMT","nullable":true},"$$ref":"#/components/headers/Date"},"Cache-Control":{"description":"Cache-Control","example":"no-cache, no-store, must-revalidate","schema":{"type":"string","default":"no-cache","nullable":true},"$$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"description":"Error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"},"errors":{"description":"An array of errors","type":"array","items":{"description":"Sub error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"}},"required":["message","code","description"],"example":{"message":"Invalid email","description":"The email you provided is invalid","code":4066},"$$ref":"#/components/schemas/SubError"}}},"example":{"message":"Unauthorized","description":"You are not authorized to access this resource","code":4065},"required":["message","code","description"],"$$ref":"#/components/schemas/Error"},"example":{"message":"Forbidden","description":"The client does not have access rights to the content.","code":403}}},"$$ref":"#/components/responses/403"},"404":{"description":"Not Found","headers":{"Date":{"description":"Date","example":"Tue, 15 Nov 1994 08:12:31 GMT","schema":{"type":"string","example":"Tue, 15 Nov 1994 08:12:31 GMT","nullable":true},"$$ref":"#/components/headers/Date"},"Cache-Control":{"description":"Cache-Control","example":"no-cache, no-store, must-revalidate","schema":{"type":"string","default":"no-cache","nullable":true},"$$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"description":"Error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"},"errors":{"description":"An array of errors","type":"array","items":{"description":"Sub error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"}},"required":["message","code","description"],"example":{"message":"Invalid email","description":"The email you provided is invalid","code":4066},"$$ref":"#/components/schemas/SubError"}}},"example":{"message":"Unauthorized","description":"You are not authorized to access this resource","code":4065},"required":["message","code","description"],"$$ref":"#/components/schemas/Error"},"example":{"message":"Not Found","description":"The server cannot find the requested resource.","code":404}}},"$$ref":"#/components/responses/404"},"500":{"description":"Internal Server Error","headers":{"Date":{"description":"Date","example":"Tue, 15 Nov 1994 08:12:31 GMT","schema":{"type":"string","example":"Tue, 15 Nov 1994 08:12:31 GMT","nullable":true},"$$ref":"#/components/headers/Date"},"Cache-Control":{"description":"Cache-Control","example":"no-cache, no-store, must-revalidate","schema":{"type":"string","default":"no-cache","nullable":true},"$$ref":"#/components/headers/Cache-Control"}},"content":{"application/json":{"schema":{"description":"Error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"},"errors":{"description":"An array of errors","type":"array","items":{"description":"Sub error object","type":"object","properties":{"message":{"description":"The message that can be displayed to the user","type":"string"},"description":{"description":"A detailed description or suggestions on how to correct the error","type":"string"},"code":{"description":"The error code","type":"integer"}},"required":["message","code","description"],"example":{"message":"Invalid email","description":"The email you provided is invalid","code":4066},"$$ref":"#/components/schemas/SubError"}}},"example":{"message":"Unauthorized","description":"You are not authorized to access this resource","code":4065},"required":["message","code","description"],"$$ref":"#/components/schemas/Error"},"example":{"message":"Internal Server Error","description":"The server encountered an unexpected condition that prevented it from fulfilling the request.","code":500}}},"$$ref":"#/components/responses/500"}},"security":[{"OAuth2":["super-admin","fabric-admin","designer","support-engineer","observer","approver"]}],"summary":"Get Virtual Machines information in a vcenter","tags":["Integrations"],"__originalOperationId":"getVcenterVmsInfo","method":"get","path":"/integrations/vCenter/{integrationId}/virtualMachines"}}