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/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/health-checks' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/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" : "793949ae-9e3a-4772-988f-5c4cf5eaa9ee",
  "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/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/health-checks/queries/793949ae-9e3a-4772-988f-5c4cf5eaa9ee' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/health-checks/queries/793949ae-9e3a-4772-988f-5c4cf5eaa9ee 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" : "793949ae-9e3a-4772-988f-5c4cf5eaa9ee",
  "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" : "9ec72b96-0ec2-43a2-8376-1752de37c7f3",
    "resourceName" : "bac5a3ca-a22c-482c-8cda-8c2a47757550"
  } ]
}

[_getvsanhealthcheckbydomain] API [_getvsanhealthcheckbyqueryid] API [_updatevsanhealthcheckbydomain] API [_getvsanhealthcheckbytaskid] API

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](index.html# HealthCheckSpec).

2.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/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" : "bac5a3ca-a22c-482c-8cda-8c2a47757550"
} ]'

HTTP Request

PATCH /v1/domains/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/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" : "bac5a3ca-a22c-482c-8cda-8c2a47757550"
} ]

HTTP Response

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

{
  "id" : "c5d6c272-0251-432b-b8b3-c14160ce7a27",
  "status" : "INPROGRESS",
  "resourceStatus" : {
    "bac5a3ca-a22c-482c-8cda-8c2a47757550" : "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/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/health-checks/tasks/c5d6c272-0251-432b-b8b3-c14160ce7a27' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/ffbb1ed0-b9c2-400c-b491-d1906dd93b8c/health-checks/tasks/c5d6c272-0251-432b-b8b3-c14160ce7a27 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" : "c5d6c272-0251-432b-b8b3-c14160ce7a27",
  "status" : "SUCCESS",
  "resourceStatus" : {
    "bac5a3ca-a22c-482c-8cda-8c2a47757550" : "SUCCESS"
  }
}

[_getvsanhealthcheckbydomain] API [_getvsanhealthcheckbyqueryid] API [_updatevsanhealthcheckbydomain] API [_getvsanhealthcheckbytaskid] API
Last updated 2025-03-21 15:13:04 +0530

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