V Sanhealth Check APIs

V Sanhealth Check APIs

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/cc79fb4f-8426-4ceb-9f9f-014853cd1308/health-checks' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/cc79fb4f-8426-4ceb-9f9f-014853cd1308/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" : "1f254b3b-72cd-4752-bde3-c29ef40d9684",
  "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/cc79fb4f-8426-4ceb-9f9f-014853cd1308/health-checks/queries/1f254b3b-72cd-4752-bde3-c29ef40d9684' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/cc79fb4f-8426-4ceb-9f9f-014853cd1308/health-checks/queries/1f254b3b-72cd-4752-bde3-c29ef40d9684 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" : "1f254b3b-72cd-4752-bde3-c29ef40d9684",
  "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" : "d00d4155-f4bb-4cb5-a518-1506af40bc97",
    "resourceName" : "59722d2e-9780-447c-b25f-5d988413fbda"
  } ]
}

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/cc79fb4f-8426-4ceb-9f9f-014853cd1308/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" : "59722d2e-9780-447c-b25f-5d988413fbda"
} ]'

HTTP Request

PATCH /v1/domains/cc79fb4f-8426-4ceb-9f9f-014853cd1308/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" : "59722d2e-9780-447c-b25f-5d988413fbda"
} ]

HTTP Response

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

{
  "id" : "1938317d-df5b-4dad-8379-bfd6753a8282",
  "status" : "INPROGRESS",
  "resourceStatus" : {
    "59722d2e-9780-447c-b25f-5d988413fbda" : "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/cc79fb4f-8426-4ceb-9f9f-014853cd1308/health-checks/tasks/1938317d-df5b-4dad-8379-bfd6753a8282' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/cc79fb4f-8426-4ceb-9f9f-014853cd1308/health-checks/tasks/1938317d-df5b-4dad-8379-bfd6753a8282 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" : "1938317d-df5b-4dad-8379-bfd6753a8282",
  "status" : "SUCCESS",
  "resourceStatus" : {
    "59722d2e-9780-447c-b25f-5d988413fbda" : "SUCCESS"
  }
}

Last updated 2023-09-23 19:05:04 -0700

Operations
GET
Get Vsan Health Check By Domain
Retrieve vSAN Health Check status for a domain by its ID
GET
Get Vsan Health Check By Query ID
Retrieve vSAN Health Check status for a domain and query ID
GET
Get Vsan Health Check By Task ID
Retrieve a vSAN Health Check by task ID
PATCH
Update Vsan Health Check By Domain
Update the vSAN Health Check status for a domain