List VMs

Details

API DetailsRelease-Specific Information
CloudCenter Platform 4xCloudCenter Suite 5x
NameList VMs
Description

Displays configured information for all VMs or for the specified VM – you can view a list by specifying any attribute used to Create Tenant

Allowed Role(s)WM_USER
MethodGET
URI
  • v1/tenants/tenantId/vms?regionName=regionName&depEnvId=depEnvId&ccmOnly=true
  • v1/tenants/tenantId/vms?regionName=regionName&depEnvId=depEnvId&nonCcmOnly=true

  • cloudcenter-ccm-backend/api/v1/tenants/tenantId/vms?regionName=regionName&depEnvId=depEnvId&ccmOnly=true
  • cloudcenter-ccm-backend/api/v1/tenants/tenantId/vms?regionName=regionName&depEnvId=depEnvId&nonCcmOnly=true

Sample Request
curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/tenants/1/vms?depEnvId=1&regionName=Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id"
curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v1/tenants/1/vms?depEnvId=1&regionName=Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id"l -k -X POST -H "Accept: application/json" -H "Content-Type: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/cloudcenter-ccm-backend/api/v1/tenants/1/images"
Release
  • Introduced in CloudCenter 4.0
  • Updated in CloudCenter 4.6.1 to include vmOperationData

Modified in CloudCenter Suite 5.0.0

Notes
  • Only resource owners and users with WRITE perms can view all the fields for this resource.
  • Other users can only view common fields like name, description, and so forth. See Permission Control for additional context.
  • The response includes information for the specified tenantId only.
  • Use the View Deployment Environments to retrieve the depEnvId.
  • You can display information for VMs in a specific tenant by including the regionName, depEnvId, and type of deployment environment (ccmOnly or nonCcmOnly) query parameters with this API.
Back To LinksCloudCenter Platform 4x APIWorkload Manager API

ESB Header

  • action: get.tenants.tenantId.vms
    actionparam: regionName=regionName&depEnvId=depEnvId&ccmOnly=true
  • action: get.tenants.tenantId.vms
    actionparam: regionName=regionName&depEnvId=depEnvId&nonCcmOnly=true

See the Enterprise Service Bus (ESB) section for additional context.

Not applicable

Sample Response: Managed VMs 

{
    "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms?depEnvId=1&regionName=
Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id-",
    "size": 4,
    "pageNumber": 0,
    "totalElements": 4,
    "totalPages": 1,
    "vms": [
      {
        "id": "i-6f8abdab",
        "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-6f8abdab?depEnvId=1&
regionName=Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id-",
        "perms": [],
        "hostName": "",
        "publicIpAddr": "5.3.10.13",
        "privateIpAddr": "12.3.4.6",
        "status": "Running",
        "startTime": 1450403495000,
        "stopTime": null,
        "isCliqrLaunched": true,
        "userId": "8",
        "jobId": "4",
        "jobName": "Jenkins_T0U02_20151215_001_run_1",
        "userEmail": "user.02@company.com",
        "vmOperationData": null
        "vmActionsData": [
            "STOP",
            "REBOOT",
            "DELETE"
        ]
 },
      {
        "id": "i-3488bff0",
        "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-3488bff0?depEnvId=1&
regionName=Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id-",
        "perms": [],
        "hostName": "",
        "publicIpAddr": "5.3.11.17",
        "privateIpAddr": "12.3.4.1",
        "status": "Running",
        "startTime": 1450170900000,
        "stopTime": null,
        "isCliqrLaunched": true,
        "userId": "2",
        "jobId": "10",
        "jobName": "Jenkins_T0UA_20151215_001_run_1",
        "userEmail": "admin@company.com",
        "vmOperationData": null
        "vmActionsData": [
            "STOP",
            "REBOOT",
            "DELETE"
        ]
 }, 
      {
        "id": "i-116f59d5",
        "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-116f59d5?depEnvId=1&
regionName=Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id-",
        "perms": [],
        "hostName": "",
        "publicIpAddr": "5.3.7.15",
        "privateIpAddr": "12.3.8.8",
        "status": "Running",
        "startTime": 1450174322000,
        "stopTime": null,
        "isCliqrLaunched": true,
        "userId": "4",
        "jobId": "18",
        "jobName": "Jenkins_T2UA_20151215_001_run_1",
        "userEmail": "admin@company.com",
        "vmOperationData": null
        "vmActionsData": [
            "STOP",
            "REBOOT",
            "DELETE"
        ]    
  }, 
      {
        "id": "i-f38dbc37",
        "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-f38dbc37?depEnvId=1&
regionName=Amazon-us-west-2&ccmOnly=true&page=0&size=30&sort=id-",
        "perms": [],
        "hostName": "",
        "publicIpAddr": "5.3.10.2",
        "privateIpAddr": "12.3.4.3",
        "status": "Running",
        "startTime": 1450234065000,
        "stopTime": null,
        "isCliqrLaunched": true,
        "userId": "2",
        "jobId": "36",
        "jobName": "Jenkins_T0UA_20151215_003_run_1",
        "userEmail": "admin@company.com",
        "vmOperationData": null
        "vmActionsData": [
            "STOP",
            "REBOOT",
            "DELETE"
        ]
     }
  ]
}


Example: Non-Managed VMs

curl -k -X GET -H "Accept: application/json" -u cloudcenteradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/tenants/1/vms?depEnvId=1®ionName=Amazon-us-west-2&nonCcmOnly=true&page=0&size=30&sort=id"

Response

{
    "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms?depEnvId=1&regionName=Amazon-
us-west-2&nonCcmOnly=true&page=0&size=30&sort=id-",
    "size": 5,
    "pageNumber": 0,
    "totalElements": 10,
    "totalPages": 1,
    "vms": [
      {
            "id": "i-6793096e",
            "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-6793096e?depEnvId=1&
regionName=Amazon-us-west-2&nonCcmOnly=true&page=0&size=30&sort=id-",
            "perms": [],
            "hostName": "ccm-aws",
            "publicIpAddr": "5.18.1.7",
            "privateIpAddr": "12.3.4.7",
            "status": "Running",
            "startTime": 1394049806000,
            "stopTime": null,
            "isCliqrLaunched": false,
            "userId": null,
            "jobId": null,
            "jobName": null,
            "userEmail": null,
            "vmOperationData": null
            "vmActionsData": [
               "STOP",
               "REBOOT",
               "DELETE"
        ]
   }, 
      {
            "id": "i-000e71d9",
            "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-000e71d9?depEnvId=1&
regionName=Amazon-us-west-2&nonCcmOnly=true&page=0&size=30&sort=id-",
            "perms": [],
            "hostName": "rabbit-centos7-4.3.2-20151215.01",
            "publicIpAddr": "5.2.15.2",
            "privateIpAddr": "12.3.1.4",
            "status": "Running",
            "startTime": 1450146278000,
            "stopTime": null,
            "isCliqrLaunched": false,
            "userId": null,
            "jobId": null,
            "jobName": null,
            "userEmail": null,
            "vmOperationData": null
            "vmActionsData": [
               "STOP",
               "REBOOT",
               "DELETE"
        ]
      }, 
      {
            "id": "i-34106fed",
            "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-34106fed?depEnvId=1&
regionName=Amazon-us-west-2&nonCcmOnly=true&page=0&size=30&sort=id-",
            "perms": [],
            "hostName": "ccm-centos7-4.3.2-20151215.01",
            "publicIpAddr": "5.2.12.8",
            "privateIpAddr": "12.3.2.19",
            "status": "Running",
            "startTime": 1450146130000,
            "stopTime": null,
            "isCliqrLaunched": false,
            "userId": null,
            "jobId": null,
            "jobName": null,
            "userEmail": null,
            "vmOperationData": null
            "vmActionsData": [
               "STOP",
               "REBOOT",
               "DELETE"
        ]
    }, 
      {
            "id": "i-04b52f0d",
            "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-04b52f0d?depEnvId=1&
regionName=Amazon-us-west-2&nonCcmOnly=true&page=0&size=30&sort=id-",
            "perms": [],
            "hostName": "cco-aws",
            "publicIpAddr": "5.18.2.1",
            "privateIpAddr": "12.3.3.1",
            "status": "Running",
            "startTime": 1394058621000,
            "stopTime": null,
            "isCliqrLaunched": false,
            "userId": null,
            "jobId": null,
            "jobName": null,
            "userEmail": null,
            "vmOperationData": null
            "vmActionsData": [
               "STOP",
               "REBOOT",
               "DELETE"
        ]
    }, 
      {
            "id": "i-da0f7003",
            "resource": "https://<HOST>:<PORT>/v1/tenants/1/vms/i-da0f7003?depEnvId=1&
regionName=Amazon-us-west-2&nonCcmOnly=true&page=0&size=30&sort=id-",
            "perms": [],
            "hostName": "cco-centos7-4.3.2-20151215.01",
            "publicIpAddr": "5.30.1.1",
            "privateIpAddr": "12.3.2.15",
            "status": "Running",
            "startTime": 1450146189000,
            "stopTime": null,
            "isCliqrLaunched": false,
            "userId": null,
            "jobId": null,
            "jobName": null,
            "userEmail": null,
            "vmOperationData": null
            "vmActionsData": [
               "STOP",
               "REBOOT",
               "DELETE"
        ]
       }
    ]
}


Request Attributes

tenantId
  • DescriptionUnique, system-generated identifier for the tenant organization. A tenant admin must belong to this tenant to invoke any APIs for this tenant. See the Tenant ID and Tenant Name Dependency section for the relevant release for additional context.

  • Type: String

Required

regionName
  • DescriptionThe name of this cloud region as listed in the Supported Public Clouds section for the relevant release.
  • Type: String

Required

depEnvId
  • DescriptionUnique, system-generated identifier for the deployment environment. See the Deployment Environments section for the relevant release for additional details. This attribute is the same as the environmentId attribute.

  • Type: String

Required

ccmOnly 
  • Description: Query parameter to identify if a VM is launched by the CloudCenter platform. See VM Operations for additional details.

    • false = Default. This VM is not launched by the CloudCenter platform 
    • true = This VM is launched by the CloudCenter platform
  • Type: String

Required

nonCcmOnly 
  • Description: Query parameter to identify if a VM is launched using another method (not by the CloudCenter platform). See VM Operations for additional details.

    • false = Default. This VM is not launched by the CloudCenter platform 
    • true = This VM is launched by the CloudCenter platform
  • Type: String

Required

Response Attributes

resource
  • Description: Unique URL to access this resource.
  • Type: String

See pageResource or Pagination for additional context

vms
  • Description: Identifies information about each VM
  • Type: Array of VMs

    id
    • DescriptionUnique, system-generated identifier for this CloudCenter Resource.

    • Type: String
    resource
    • Description: Unique URL to access this resource.
    • Type: String
    perms (click for additional details)
    hostName
    • Description: The DNS host name for this VM.

    • Type: String
    publicIpAddr
    • Description: Public IP address of the application VM or CCO. This attribute is the same as the publicIp or publicIpAddress attributes.
    • Type: String
    privateIpAddr
    • Description: Private IP address of the application VM or CCO. This attribute is the same as the privateIp attribute and the privateIpAddress attribute.
    • Type: String
    status
    • Description: Status of the operation. See the Deployment and VM States section for the relevant release to view a list of all job operations.

    • Type: Enumeration

      EnumerationDescription
      SUBMITTEDThe operation has been submitted
      RUNNINGThe operation is currently in progress
      SUCCESSThe operation succeeded
      FAILThe operation failed
    startTime
    stopTime
    • Description: Stop time for this VM.
    • Type: Long
    isCliqrLaunched
    • Description: Identifies if the server was launched using CCM.
    • Type: Boolean
    userId
    • Description: Unique, system-generated identifier for a user
    • Type: String
    jobId
    • DescriptionUnique, system-generated identifier for the job
    • Type: String
    jobName
    • Description: The name of this job
    • Type: String
    userEmail
    • Description: Email address of the resource
    • Type: String
    vmOperationData
    • Description: Identifies information about VM operations
    • Type: Array of mapped attributes

      action
      • Description: Identifies the valid operations that can be performed on the VM.
      • Type: Array of Enumeration vmAction

        Enumeration Description
        STARTStart this VM
        STOPStop this VM
        REBOOTReboot this VM
        DELETEDelete this VM
      depEnvId
      • DescriptionUnique, system-generated identifier for the deployment environment. See the Deployment Environments section for the relevant release for additional details. This attribute is the same as the environmentId attribute.

      • Type: String

      depEnvName
      • Description: The name of the deployment environment. See the Deployment Environments section for the relevant release for additional details.
      • Type: String

      cloudRegion (click for additional context)

     

    vmActionsData

    action
    • Description: Identifies the valid operations that can be performed on the VM.
    • Type: Array of Enumeration vmAction

      Enumeration Description
      STARTStart this VM
      STOPStop this VM
      REBOOTReboot this VM
      DELETEDelete this VM

     

     

     

© 2017-2019 Cisco Systems, Inc. All rights reserved