[{"label":"Latest (5.0.0)","version":"latest"},{"version":"4.5.1"},{"version":"4.5.0"},{"version":"4.4.0"},{"version":"4.3.1"},{"link":"https://developer.vmware.com/apis/1127/vmware-cloud-foundation","version":"4.3"},{"link":"https://developer.vmware.com/apis/1078/vmware-cloud-foundation","version":"4.2"},{"link":"https://developer.vmware.com/apis/1033/vmware-cloud-foundation","version":"4.1"},{"link":"https://developer.vmware.com/apis/1003/vmware-cloud-foundation","version":"4.0.1"},{"link":"https://developer.vmware.com/apis/939/vmware-cloud-foundation","version":"4.0"}]
vcf-for-vxrail
VMware Cloud Foundation on Dell EMC VxRail API Reference Guide

V San Health Check

APIs for managing vSAN health checks

Table of Contents

1. Get vSAN health check status

  • Get vSAN health check status API is used to fetch vSAN health check status.

1.1. Prerequisites

The following data is required:

  • ID of a domain

The following data is optional:

  • Status of health check [ENABLED / DISABLED]

1.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 102

{
  "resultId" : "0b8bed3f-a4da-4299-bbcc-3c49ff0d688d",
  "status" : "INPROGRESS",
  "result" : [ ]
}
  • Poll the vSAN health check status with the ID from the response of the previous API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks/queries/0b8bed3f-a4da-4299-bbcc-3c49ff0d688d' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks/queries/0b8bed3f-a4da-4299-bbcc-3c49ff0d688d HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

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

{
  "resultId" : "0b8bed3f-a4da-4299-bbcc-3c49ff0d688d",
  "status" : "SUCCESS",
  "result" : [ {
    "id" : "objecthealth",
    "name" : "vSAN object health",
    "description" : "Checks the health status of all vSAN objects.",
    "type" : "VSAN",
    "status" : "ENABLED",
    "resourceType" : "CLUSTER",
    "resourceId" : "0c6cc27f-d614-47a4-be97-8cff13aad431",
    "resourceName" : "973a7e70-09ef-4d56-a952-f7b32e821d06"
  } ]
}

2. Update vSAN health check status

  • Update vSAN health check status API is used to update the vSAN health check status.

2.1. Prerequisites

The following data is required:

  • ID of the Domain

  • List of vSAN health check spec

Tip : Refer to: HealthCheckSpec

2.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '[ {
  "id" : "objecthealth",
  "name" : "vSAN object health",
  "status" : "DISABLED",
  "resourceType" : "CLUSTER",
  "resourceName" : "973a7e70-09ef-4d56-a952-f7b32e821d06"
} ]'

HTTP Request

PATCH /v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 178
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

[ {
  "id" : "objecthealth",
  "name" : "vSAN object health",
  "status" : "DISABLED",
  "resourceType" : "CLUSTER",
  "resourceName" : "973a7e70-09ef-4d56-a952-f7b32e821d06"
} ]

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 164

{
  "id" : "191c9374-bb44-45bb-915d-ecaec20d4f8e",
  "status" : "INPROGRESS",
  "resourceStatus" : {
    "973a7e70-09ef-4d56-a952-f7b32e821d06" : "INPROGRESS"
  }
}
  • Poll the status of the vSAN health check update with the ID from the response of the previous API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks/tasks/191c9374-bb44-45bb-915d-ecaec20d4f8e' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/511f9891-83ed-4461-9e88-852b70252995/health-checks/tasks/191c9374-bb44-45bb-915d-ecaec20d4f8e HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

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

{
  "id" : "191c9374-bb44-45bb-915d-ecaec20d4f8e",
  "status" : "SUCCESS",
  "resourceStatus" : {
    "973a7e70-09ef-4d56-a952-f7b32e821d06" : "SUCCESS"
  }
}

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

Operations



[{"label":"Latest (5.0.0)","version":"latest"},{"version":"4.5.1"},{"version":"4.5.0"},{"version":"4.4.0"},{"version":"4.3.1"},{"link":"https://developer.vmware.com/apis/1127/vmware-cloud-foundation","version":"4.3"},{"link":"https://developer.vmware.com/apis/1078/vmware-cloud-foundation","version":"4.2"},{"link":"https://developer.vmware.com/apis/1033/vmware-cloud-foundation","version":"4.1"},{"link":"https://developer.vmware.com/apis/1003/vmware-cloud-foundation","version":"4.0.1"},{"link":"https://developer.vmware.com/apis/939/vmware-cloud-foundation","version":"4.0"}]
vcf-for-vxrail
Feedback

Was this page helpful?