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/e99e1668-39ba-4a3f-9791-93dd0b8f6266
Content-Type: application/json
Content-Length: 526

{
  "id" : "e99e1668-39ba-4a3f-9791-93dd0b8f6266",
  "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/a9b6a644-314a-4c83-92d1-6c8345392c5b
Content-Type: application/json
Content-Length: 526

{
  "id" : "a9b6a644-314a-4c83-92d1-6c8345392c5b",
  "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/58c16c8b-07ce-41b3-b263-a0be042407bc
Content-Type: application/json
Content-Length: 526

{
  "id" : "58c16c8b-07ce-41b3-b263-a0be042407bc",
  "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/e99e1668-39ba-4a3f-9791-93dd0b8f6266' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/validations/e99e1668-39ba-4a3f-9791-93dd0b8f6266 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" : "e99e1668-39ba-4a3f-9791-93dd0b8f6266",
  "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/e99e1668-39ba-4a3f-9791-93dd0b8f6266' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/hosts/validations/e99e1668-39ba-4a3f-9791-93dd0b8f6266 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" : "e99e1668-39ba-4a3f-9791-93dd0b8f6266",
  "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/6f57488e-f2e5-4170-9f7e-fce7a191bbac
Content-Type: application/json
Content-Length: 246

{
  "id" : "6f57488e-f2e5-4170-9f7e-fce7a191bbac",
  "name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-29T00:30:18.489Z"
}

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/c72525a8-a2b2-4672-ac4c-f4c4e43751e0
Content-Type: application/json
Content-Length: 246

{
  "id" : "c72525a8-a2b2-4672-ac4c-f4c4e43751e0",
  "name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-29T00:30:19.080Z"
}

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/3592223e-0f76-4394-80de-1642db0bc961
Content-Type: application/json
Content-Length: 246

{
  "id" : "3592223e-0f76-4394-80de-1642db0bc961",
  "name" : "Commission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-29T00:30:18.077Z"
}
  • 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/b27326b3-1466-4f1c-b615-417ba96ae0c4
Content-Type: application/json
Content-Length: 183

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "queryId" : "b27326b3-1466-4f1c-b615-417ba96ae0c4",
    "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/5468e734-bff8-42b5-a3b1-f3e22e2bcecc
Content-Type: application/json
Content-Length: 248

{
  "id" : "5468e734-bff8-42b5-a3b1-f3e22e2bcecc",
  "name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-29T00:30:18.302Z"
}

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/05c9d1f6-eaba-4fb3-b7b4-407f28e2fd93
Content-Type: application/json
Content-Length: 248

{
  "id" : "05c9d1f6-eaba-4fb3-b7b4-407f28e2fd93",
  "name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-29T00:30:18.629Z"
}

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/475b705f-a59f-4e6a-9a07-27bf1ce254ef
Content-Type: application/json
Content-Length: 248

{
  "id" : "475b705f-a59f-4e6a-9a07-27bf1ce254ef",
  "name" : "Decommission Hosts - [esx-1.vrack.vsphere.local, esx-2.vrack.vsphere.local] to VMware Cloud Foundation",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2022-09-29T00:30:18.687Z"
}
  • 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 2022-09-28 17:42:27 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