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/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 2022-09-28 17:42:27 PDT
Operations
GET
Get Health Check Query
Get vSAN health check status
GET
Get Health Check Status
Get vSAN health check status by Query Id
GET
Get Health Check Status Task
Get vSAN health check update task status
PATCH
Set Health Check Status
Update vSAN health check status