Hosts APIs

Hosts APIs

APIs for managing Hosts

Table of Contents

1. Commission the Hosts

1.1. Prerequisites

  • The following data is required

    • Username of each host

    • Password of each host

    • FQDN of each host

    • Network pool name to which each host has to be associated with (Optional)

    • Network pool ID to which each host has to be associated with

Tip : Refer to: Get the Network Pools and Get a Network of a Network Pool

  • The host, if intended to be used for a vSAN domain, should be vSAN compliant and certified as per the VMware Hardware Compatibility Guide.

  • BIOS, HBA, SSD, HDD, etc. of the host must match the VMware Hardware Compatibility Guide.

  • The host must have the drivers and firmware versions specified in the VMware Hardware Compatibility Guide.

  • The host must have the supported version of ESXi (i.e 6.7.0-13006603) pre-installed on it.

  • SSH and syslog must be enabled on the host.

  • The host must be configured with DNS server for forward and reverse lookup and FQDN.

  • The host name must be same as the FQDN.

  • The host must have a standard switch with two NIC ports with a minimum 10 Gbps speed.

  • The management IP must be configured to the first NIC port.

  • Ensure that the host has a standard switch and the default uplinks with 10Gb speed are configured starting with traditional numbering (e.g., vmnic0) and increasing sequentially.

  • Ensure that the host hardware health status is healthy without any errors.

  • All disk partitions on HDD / SSD are deleted.

  • The hosts, if intended to be used for vSAN, domain must be associated with vSAN enabled network pool.

  • The hosts, if intended to be used for NFS, domain must be associated with NFS enabled network pool.

  • The hosts, if intended to be used for VMFS on FC, domain must be associated with either a NFS enabled or vMotion enabled network pool.

  • The hosts, if intended to be used for VVOL, domain must be associated with either a NFS enabled or vMotion enabled network pool.

  • The hosts, if intended to be used for vSAN HCI Mesh(VSAN_REMOTE), domain must be associated with vSAN enabled network pool.

1.2. Steps

  • Validate the input specification.

For VSAN storage type
cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]'

HTTP Request

POST /v1/hosts/validations HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/57d6f7a3-e8fa-48fb-a244-a280d6d629b0
Content-Type: application/json
Content-Length: 526

{
  "id" : "57d6f7a3-e8fa-48fb-a244-a280d6d629b0",
  "description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
  "executionStatus" : "IN_PROGRESS",
  "validationChecks" : [ {
    "description" : "Validating input specification",
    "resultStatus" : "UNKNOWN"
  }, {
    "description" : "Validating host sfo01-m01-esx01.rainpole.io",
    "resultStatus" : "UNKNOWN"
  }, {
    "description" : "Validating host sfo01-m01-esx02.rainpole.io",
    "resultStatus" : "UNKNOWN"
  } ]
}

For vVol storage type
cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VVOL",
  "vvolStorageProtocolType" : "ISCSI",
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VVOL",
  "vvolStorageProtocolType" : "NFS",
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]'

HTTP Request

POST /v1/hosts/validations HTTP/1.1
Content-Type: application/json
Content-Length: 694
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VVOL",
  "vvolStorageProtocolType" : "ISCSI",
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VVOL",
  "vvolStorageProtocolType" : "NFS",
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/e77fdd0a-bb8b-458d-b72a-c8a3c868d2a3
Content-Type: application/json
Content-Length: 526

{
  "id" : "e77fdd0a-bb8b-458d-b72a-c8a3c868d2a3",
  "description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
  "executionStatus" : "IN_PROGRESS",
  "validationChecks" : [ {
    "description" : "Validating input specification",
    "resultStatus" : "UNKNOWN"
  }, {
    "description" : "Validating host sfo01-m01-esx01.rainpole.io",
    "resultStatus" : "UNKNOWN"
  }, {
    "description" : "Validating host sfo01-m01-esx02.rainpole.io",
    "resultStatus" : "UNKNOWN"
  } ]
}

For vSAN Remote storage type
cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN_REMOTE",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN_REMOTE",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]'

HTTP Request

POST /v1/hosts/validations HTTP/1.1
Content-Type: application/json
Content-Length: 704
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN_REMOTE",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN_REMOTE",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/hosts/validations/edfe8d95-952d-4b2b-b720-998a3e51e35b
Content-Type: application/json
Content-Length: 526

{
  "id" : "edfe8d95-952d-4b2b-b720-998a3e51e35b",
  "description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
  "executionStatus" : "IN_PROGRESS",
  "validationChecks" : [ {
    "description" : "Validating input specification",
    "resultStatus" : "UNKNOWN"
  }, {
    "description" : "Validating host sfo01-m01-esx01.rainpole.io",
    "resultStatus" : "UNKNOWN"
  }, {
    "description" : "Validating host sfo01-m01-esx02.rainpole.io",
    "resultStatus" : "UNKNOWN"
  } ]
}
  • Poll until "executionStatus" is not "IN_PROGRESS" using the "id" from the previous response.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations/57d6f7a3-e8fa-48fb-a244-a280d6d629b0' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/validations/57d6f7a3-e8fa-48fb-a244-a280d6d629b0 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 436

{
  "id" : "57d6f7a3-e8fa-48fb-a244-a280d6d629b0",
  "description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
  "executionStatus" : "IN_PROGRESS",
  "validationChecks" : [ {
    "description" : "Validating host sfo01-m01-esx01.rainpole.io",
    "resultStatus" : "SUCCEEDED"
  }, {
    "description" : "Validating host sfo01-m01-esx02.rainpole.io",
    "resultStatus" : "UNKNOWN"
  } ]
}
  • In case of no errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "SUCCEEDED".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/validations/57d6f7a3-e8fa-48fb-a244-a280d6d629b0' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/validations/57d6f7a3-e8fa-48fb-a244-a280d6d629b0 HTTP/1.1
Content-Type: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 442

{
  "id" : "57d6f7a3-e8fa-48fb-a244-a280d6d629b0",
  "description" : "Validate input specification to commission one or more hosts to VMware Cloud Foundation",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ {
    "description" : "Validating input specification",
    "resultStatus" : "SUCCEEDED"
  }, {
    "description" : "Validating input specification",
    "resultStatus" : "SUCCEEDED"
  } ]
}
  • In case of errors in the input specification, the "executionStatus" is "COMPLETED" and "resultStatus" is "FAILED".

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

Note : It is recommended to validate host commission input specification before triggering the host commission operation.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]'

HTTP Request

POST /v1/hosts HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/63a9112a-fa79-443c-b5ea-dfaae285f6fa
Content-Type: application/json
Content-Length: 246

{
  "id" : "63a9112a-fa79-443c-b5ea-dfaae285f6fa",
  "name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-04-27T17:59:18.633Z"
}

Note : To skip failed hosts during commission workflow set the query parameter skipFailedHosts to true as follows.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=true' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]'

HTTP Request

POST /v1/hosts?skipFailedHosts=true HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/ec95d56d-284d-4f83-97cd-3fe529ee9300
Content-Type: application/json
Content-Length: 246

{
  "id" : "ec95d56d-284d-4f83-97cd-3fe529ee9300",
  "name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-04-27T17:59:19.199Z"
}

Note : By default skip failed hosts flag is enabled, to disable skip failed hosts flag during commission workflow set the query parameter skipFailedHosts to false as follows.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=false' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]'

HTTP Request

POST /v1/hosts?skipFailedHosts=false HTTP/1.1
Content-Type: application/json
Content-Length: 668
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "58d74167-ee80-4eb8-90d9-cdfb3c1cd9f3",
  "networkPoolName" : "engineering-networkpool",
  "sshThumbprint" : null,
  "sslThumbprint" : null
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io",
  "username" : "root",
  "password" : "VMwareInfra@1",
  "storageType" : "VSAN",
  "vvolStorageProtocolType" : null,
  "networkPoolId" : "1ff2838a-1983-4747-a94d-d30b2d13a973",
  "networkPoolName" : "finance-networkpool",
  "sshThumbprint" : "sshThumbprint",
  "sslThumbprint" : "sslThumbprint"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/4f65a3dd-5643-474b-8cd8-19b0d6df6bfe
Content-Type: application/json
Content-Length: 246

{
  "id" : "4f65a3dd-5643-474b-8cd8-19b0d6df6bfe",
  "name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-04-27T17:59:18.344Z"
}
  • Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry a Task.

2. Get the Hosts

2.1. Prerequisites

None
Get All Hosts

2.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 4708

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  }, {
    "id" : "8045e44e-974e-4f43-9862-7f0326782638",
    "esxiVersion" : "6.5.0-13006603",
    "fqdn" : "sfo01-m01-esx02.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.101",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "status" : "UNASSIGNED_USEABLE",
    "hybrid" : true
  }, {
    "id" : "8045e44e-974e-4f43-9862-7f0326782638",
    "esxiVersion" : "6.5.0-13006603",
    "fqdn" : "sfo01-m01-esx03.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.102",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "status" : "UNASSIGNED_UNUSEABLE",
    "hybrid" : true
  } ]
}

Get ASSIGNED Hosts
This API can be used to fetch all the hosts that are currently assigned to any domain and hence cannot be used for other domain tasks

2.3. Steps

  • Invoke the API by specifying the "status" as "ASSIGNED".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?status=ASSIGNED' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?status=ASSIGNED HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1706

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  } ]
}

Get UNASSIGNED_USEABLE Hosts
This API can be used to fetch all the hosts that are currently not assigned to any domain and hence can be used for other domain tasks

2.4. Steps

  • Invoke the API by specifying the "status" as "UNASSIGNED_USEABLE".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?status=UNASSIGNED_USEABLE' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?status=UNASSIGNED_USEABLE HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1521

{
  "elements" : [ {
    "id" : "8045e44e-974e-4f43-9862-7f0326782638",
    "esxiVersion" : "6.5.0-13006603",
    "fqdn" : "sfo01-m01-esx02.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.101",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "status" : "UNASSIGNED_USEABLE",
    "hybrid" : true
  } ]
}

Get UNASSIGNED_UNUSEABLE Hosts
This API can be used to fetch all the hosts that are currently not assigned to any domain and can be used for other domain tasks after completion of cleanup operation

Note : Cleanup operations must be performed to get these host back into "UNASSIGNED" and "USEABLE" state.

2.5. Steps

  • Invoke the API by specifying the "status" as "UNASSIGNED_UNUSEABLE".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?status=UNASSIGNED_UNUSEABLE' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?status=UNASSIGNED_UNUSEABLE HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1523

{
  "elements" : [ {
    "id" : "8045e44e-974e-4f43-9862-7f0326782638",
    "esxiVersion" : "6.5.0-13006603",
    "fqdn" : "sfo01-m01-esx03.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.102",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "status" : "UNASSIGNED_UNUSEABLE",
    "hybrid" : true
  } ]
}

Get Hosts by Domain
This API can be used to fetch all the hosts that are currently assigned to a given domain.

2.6. Steps

  • Invoke the API by specifying the "domainId".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?domainId=377236f7-4965-4179-895e-eeb4eb9a6ad1' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?domainId=377236f7-4965-4179-895e-eeb4eb9a6ad1 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1706

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  } ]
}

Get Hosts by Cluster
This API can be used to fetch all the hosts that are currently assigned to a given cluster.

2.7. Steps

  • Invoke the API by specifying the "clusterId".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?clusterId=4205afdd-94f5-403e-a051-1a9bba09ef40' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?clusterId=4205afdd-94f5-403e-a051-1a9bba09ef40 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1706

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  } ]
}

Get Hosts by Network Pool
This API can be used to fetch all the hosts that are currently assigned to a given network pool.

2.8. Steps

  • Invoke the API by specifying the "networkpoolId".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?networkpoolId=1205afdd-84f5-403e-a052-1a9bba09ef41' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?networkpoolId=1205afdd-84f5-403e-a052-1a9bba09ef41 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1706

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  } ]
}

Get Hosts by Storage Type
This API can be used to fetch all the hosts that are currently configured with the given storage type.

Note : Supported storage type is "VMFS_FC" , "VVOL".

2.9. Steps

  • Invoke the API by specifying the "storageType".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?storageType=VMFS_FC' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?storageType=VMFS_FC HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1706

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  } ]
}

Get Hosts by Datastore Name
This API can be used to fetch all the hosts that are currently configured with the given datastore.

2.10. Steps

  • Invoke the API by specifying the "datastoreName".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?datastoreName=datastore1' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts?datastoreName=datastore1 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1706

{
  "elements" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
    "esxiVersion" : "6.7.0-13006603",
    "fqdn" : "sfo01-m01-esx01.rainpole.io",
    "hardwareVendor" : "VMware, Inc.",
    "hardwareModel" : "VMware Virtual Platform",
    "isPrimary" : false,
    "ipAddresses" : [ {
      "ipAddress" : "10.0.0.100",
      "type" : "MANAGEMENT"
    } ],
    "cpu" : {
      "frequencyMHz" : 4994.0,
      "usedFrequencyMHz" : 0.0,
      "cores" : 2,
      "cpuCores" : [ {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      }, {
        "frequencyMHz" : 2497.0,
        "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
        "manufacturer" : "Intel"
      } ]
    },
    "memory" : {
      "totalCapacityMB" : 79999.0,
      "usedCapacityMB" : 0.0
    },
    "storage" : {
      "totalCapacityMB" : 781250.0,
      "usedCapacityMB" : 0.0,
      "disks" : [ {
        "capacityMB" : 390625.0,
        "diskType" : "HDD"
      }, {
        "capacityMB" : 390625.0,
        "diskType" : "FLASH"
      } ]
    },
    "physicalNics" : [ {
      "deviceName" : "vmnic0",
      "macAddress" : "02:00:1b:31:93:d2",
      "speed" : 0,
      "unit" : "MB"
    }, {
      "deviceName" : "vmnic1",
      "macAddress" : "02:00:1b:31:93:d3",
      "speed" : 0,
      "unit" : "MB"
    } ],
    "domain" : {
      "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
    },
    "networkpool" : {
      "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
    },
    "cluster" : {
      "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
    },
    "status" : "ASSIGNED",
    "compatibleStorageType" : "VMFS_FC",
    "hybrid" : false
  } ]
}

3. Get a Host

3.1. Prerequisites

The following data is required

  • ID of the host

3.2. Steps

  • Invoke the API by providing the ID of the host as input.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/c0703437-6746-470b-9e1c-f9d3bbc9b1c1' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/c0703437-6746-470b-9e1c-f9d3bbc9b1c1 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1557

{
  "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c1",
  "esxiVersion" : "6.7.0-13006603",
  "fqdn" : "sfo01-m01-esx01.rainpole.io",
  "hardwareVendor" : "VMware, Inc.",
  "hardwareModel" : "VMware Virtual Platform",
  "isPrimary" : false,
  "ipAddresses" : [ {
    "ipAddress" : "10.0.0.100",
    "type" : "MANAGEMENT"
  } ],
  "cpu" : {
    "frequencyMHz" : 4994.0,
    "usedFrequencyMHz" : 0.0,
    "cores" : 2,
    "cpuCores" : [ {
      "frequencyMHz" : 2497.0,
      "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
      "manufacturer" : "Intel"
    }, {
      "frequencyMHz" : 2497.0,
      "model" : "Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz",
      "manufacturer" : "Intel"
    } ]
  },
  "memory" : {
    "totalCapacityMB" : 79999.0,
    "usedCapacityMB" : 0.0
  },
  "storage" : {
    "totalCapacityMB" : 781250.0,
    "usedCapacityMB" : 0.0,
    "disks" : [ {
      "capacityMB" : 390625.0,
      "diskType" : "HDD"
    }, {
      "capacityMB" : 390625.0,
      "diskType" : "FLASH"
    } ]
  },
  "physicalNics" : [ {
    "deviceName" : "vmnic0",
    "macAddress" : "02:00:1b:31:93:d2",
    "speed" : 0,
    "unit" : "MB"
  }, {
    "deviceName" : "vmnic1",
    "macAddress" : "02:00:1b:31:93:d3",
    "speed" : 0,
    "unit" : "MB"
  } ],
  "domain" : {
    "id" : "377236f7-4965-4179-895e-eeb4eb9a6ad1"
  },
  "networkpool" : {
    "id" : "1205afdd-84f5-403e-a052-1a9bba09ef41"
  },
  "cluster" : {
    "id" : "4205afdd-94f5-403e-a051-1a9bba09ef40"
  },
  "status" : "ASSIGNED",
  "compatibleStorageType" : "VMFS_FC",
  "hybrid" : false
}

4. Get the Hosts based on a Criterion

This API is used to get the hosts that meets a specific criterion.

4.1. Prerequisites

None
Get the hosts based on a criterion

4.2. Steps

  • Invoke the Get Host Criterion API to list all the criteria supported.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/criteria' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/criteria HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 535

{
  "elements" : [ {
    "name" : "HOST_COMPATIBLE_WITH_CLUSTER_USING_PNICS",
    "arguments" : {
      "storageType" : "Storage type of host",
      "clusterId" : "ID of the cluster"
    },
    "description" : "Return all hosts that are compatible with a cluster"
  }, {
    "name" : "UNMANAGED_HOSTS_IN_HCIMGR",
    "arguments" : {
      "hciManagerFqdn" : "HCI Manager FQDN",
      "hciManagerSslThumbprint" : "HCI Manager SSL Thumbprint"
    },
    "description" : "Return all the unmanaged hosts discovered by HCI manager"
  } ]
}
  • Pick one of the criterion and post a query

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/queries' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "HOST_COMPATIBLE_WITH_CLUSTER_USING_PNICS",
  "arguments" : {
    "storageType" : "VSAN",
    "clusterId" : ""
  },
  "description" : "fetch all the hosts compatible with a cluster"
}'

HTTP Request

POST /v1/hosts/queries HTTP/1.1
Content-Type: application/json
Content-Length: 196
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "HOST_COMPATIBLE_WITH_CLUSTER_USING_PNICS",
  "arguments" : {
    "storageType" : "VSAN",
    "clusterId" : ""
  },
  "description" : "fetch all the hosts compatible with a cluster"
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/hosts/queries/0b4c5f16-a014-4261-8277-21dc13d815c5
Content-Type: application/json
Content-Length: 183

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "queryId" : "0b4c5f16-a014-4261-8277-21dc13d815c5",
    "completed" : false,
    "processing" : true,
    "failure" : false
  }
}
  • Read the tracking URL returned as Location header in the previous step.

  • Poll the tracking URL until the "status" is not "IN_PROGRESS".

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts/queries/23dbc8bc-4981-4006-bf2d-5f0c9467ab79' -i -X GET \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/queries/23dbc8bc-4981-4006-bf2d-5f0c9467ab79 HTTP/1.1
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3397

{
  "queryInfo" : {
    "status" : "COMPLETED",
    "queryId" : "dummy_query_id",
    "completed" : true,
    "processing" : false,
    "failure" : false
  },
  "result" : {
    "elements" : [ {
      "id" : "44806db8-4401-4d74-be0a-f9067d048314",
      "esxiVersion" : "6.7.0-14320388",
      "fqdn" : "sfo01-m01-esx01.rainpole.io",
      "hardwareVendor" : "VMware, Inc.",
      "hardwareModel" : "VMware Virtual Platform",
      "ipAddresses" : [ {
        "ipAddress" : "10.0.0.100",
        "type" : "MANAGEMENT"
      }, {
        "ipAddress" : "10.0.4.3",
        "type" : "VSAN"
      }, {
        "ipAddress" : "10.0.8.3",
        "type" : "VMOTION"
      } ],
      "cpu" : {
        "frequencyMHz" : 19155.640625,
        "usedFrequencyMHz" : 767.0,
        "cores" : 8,
        "cpuCores" : [ {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        }, {
          "frequencyMHz" : 2394.455078125,
          "model" : "intel",
          "manufacturer" : "Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
        } ]
      },
      "memory" : {
        "totalCapacityMB" : 63999.42578125,
        "usedCapacityMB" : 29454.0
      },
      "storage" : {
        "totalCapacityMB" : 1757712.0,
        "usedCapacityMB" : 587753.125,
        "disks" : [ {
          "capacityMB" : 146484.375,
          "diskType" : "HDD"
        }, {
          "capacityMB" : 146484.375,
          "diskType" : "HDD"
        }, {
          "capacityMB" : 146484.375,
          "diskType" : "FLASH"
        }, {
          "capacityMB" : 146484.375,
          "diskType" : "HDD"
        } ]
      },
      "physicalNics" : [ {
        "deviceName" : "vmnic0",
        "macAddress" : "02:00:ed:4e:e1:e2"
      }, {
        "deviceName" : "vmnic1",
        "macAddress" : "02:00:ed:f3:29:03"
      }, {
        "deviceName" : "vmnic2",
        "macAddress" : "02:00:ed:f0:44:b6"
      }, {
        "deviceName" : "vmnic3",
        "macAddress" : "02:00:ed:f0:91:45"
      } ],
      "domain" : {
        "id" : "7572b048-51b3-44c6-bf62-356b3baef8f9"
      },
      "networkpool" : {
        "id" : "bea95488-1fbb-4fe7-8bf7-e431c4afdd68",
        "name" : "bringup-networkpool"
      },
      "cluster" : {
        "id" : "a481407c-7e00-4489-afb1-c89f21dc8c84"
      },
      "status" : "ASSIGNED",
      "bundleRepoDatastore" : "lcm-bundle-repo",
      "hybrid" : false
    } ]
  }
}

5. Decommission the Hosts

5.1. Prerequisites

  • The following data is required

    • FQDN of each host
  • The host must not be assigned to a domain i.e "status" must be "UNASSIGNED_USEABLE".

Tip : Refer to: Get the Hosts to fetch the hosts with the required "status"

5.2. Steps

  • Invoke the API

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]'

HTTP Request

DELETE /v1/hosts HTTP/1.1
Content-Type: application/json
Content-Length: 94
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/4b2a03fe-a70d-4235-8227-0a8b0eeadf61
Content-Type: application/json
Content-Length: 248

{
  "id" : "4b2a03fe-a70d-4235-8227-0a8b0eeadf61",
  "name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-04-27T17:59:18.526Z"
}

Note : To skip failed hosts during decommission workflow set the query parameter skipFailedHosts to true as follows.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=true' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]'

HTTP Request

DELETE /v1/hosts?skipFailedHosts=true HTTP/1.1
Content-Type: application/json
Content-Length: 94
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/d221c73e-51ec-43f3-913d-952750c60d2c
Content-Type: application/json
Content-Length: 248

{
  "id" : "d221c73e-51ec-43f3-913d-952750c60d2c",
  "name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-04-27T17:59:18.822Z"
}

Note : By default skip failed hosts flag is enabled, to disable skip failed hosts flag during decommission workflow set the query parameter skipFailedHosts to false as follows.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/hosts?skipFailedHosts=false' -i -X DELETE \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]'

HTTP Request

DELETE /v1/hosts?skipFailedHosts=false HTTP/1.1
Content-Type: application/json
Content-Length: 94
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "fqdn" : "sfo01-m01-esx01.rainpole.io"
}, {
  "fqdn" : "sfo01-m01-esx02.rainpole.io"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/tasks/c7704c9b-73d0-4cb7-b3e0-91cc991ea222
Content-Type: application/json
Content-Length: 248

{
  "id" : "c7704c9b-73d0-4cb7-b3e0-91cc991ea222",
  "name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2023-04-27T17:59:18.883Z"
}
  • Poll the task until "status" is not "IN_PROGRESS" using the "id" from the previous response.

Tip : Refer to: Get a Task.

  • If the "status" is "SUCCESSFUL", the task is completed successfully.

  • If the "status" is "FAILED", the task can be re-executed.

Tip : Refer to: Retry a Task.

Last updated 2023-04-27 11:11:38 PDT

Operations
GET
Assignable Tags To Host
get Assignable Tags to Host
PUT
Assign Tags To Existing Host
Assign Tags to Host
POST
Commission Hosts
Commission the Hosts
DELETE
Decommission Hosts
Decommission the Hosts
GET
Get Criteria
Get all criteria
GET
Get Criterion
Get a criterion
GET
Get Host
Get a Host
GET
Get Host Query Response 1
Get query response
GET
Get Hosts
Get the Hosts
GET
Get Host Tag Manager Url
Get Host Tag Manager Url
GET
Get Tags Assigned To Host
Get Tags assigned to Host
GET
Get Tags Assigned To Hosts
Get Tags assigned to Hosts
GET
Get Validation For Commission Hosts
Get the status of the validation of the input specification to commission the Hosts
POST
Post Query
Post a query
DELETE
Remove Tags From Host
Remove Tags From Host
POST
Validate Hosts Operations
Validate the input spec for hosts operations