Sos APIs
APIs for managing SOS
Note : The /v1/sddcs APIs are available only on the Cloud Builder appliance
Table of Contents
1. Generate Support-Bundle for SDDC.
Generate Support-Bundle operation will:
Collects logs of various components of SDDC stack.
The whole logs are included in a archive file.
This can be downloaded by the user.
The result is supportbundle.
1.1. Prerequisites
The following data is optional
logs
vcLogs
nsxLogs
esxLogs
wcpLogs
sddcManagerLogs
apiLogs
vxrailManagerLogs
systemDebugLogs
vmScreenshots
vraLogs
vropsLogs
vrliLogs
vrslcmLogs
scope
includeFreeHosts
domains
domainName
clusterNames
options
include
summaryReport
healthCheck
Note : To trigger the API, the user should have a role of an ADMIN or OPERATOR in VCF.
Note : User cannot initiate parallel Support bundle collection.
Note : User can also pass empty specification as data, then default logs will be conducted.
Note : Only single domain is allowed in domain field.
Note : It is not advised to run CLI and API operations in parallel.
Note : If no domain is passed default MANAGEMENT domain will be considered.
Note : Scope field is not applicable for SDDCMANAGER, SYSTEMDEBUG and API logs irrespective of the domain passed.
1.2. Steps
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/support-bundles' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"options" : {
"config" : {
"skipKnownHostCheck" : false,
"force" : false
},
"include" : {
"summaryReport" : false,
"healthCheck" : false
}
},
"scope" : {
"includeFreeHosts" : false,
"domains" : [ {
"domainName" : "sddcId-1001",
"clusterNames" : [ "SDDC-Cluster1" ]
} ]
},
"logs" : {
"vcLogs" : false,
"nsxLogs" : false,
"esxLogs" : false,
"wcpLogs" : false,
"sddcManagerLogs" : true,
"apiLogs" : true,
"vxrailManagerLogs" : false,
"systemDebugLogs" : false,
"vmScreenshots" : false,
"vraLogs" : false,
"vropsLogs" : false,
"vrliLogs" : false,
"vrslcmLogs" : false
}
}'
HTTP Request
POST /v1/system/support-bundles HTTP/1.1
Content-Type: application/json
Content-Length: 697
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"options" : {
"config" : {
"skipKnownHostCheck" : false,
"force" : false
},
"include" : {
"summaryReport" : false,
"healthCheck" : false
}
},
"scope" : {
"includeFreeHosts" : false,
"domains" : [ {
"domainName" : "sddcId-1001",
"clusterNames" : [ "SDDC-Cluster1" ]
} ]
},
"logs" : {
"vcLogs" : false,
"nsxLogs" : false,
"esxLogs" : false,
"wcpLogs" : false,
"sddcManagerLogs" : true,
"apiLogs" : true,
"vxrailManagerLogs" : false,
"systemDebugLogs" : false,
"vmScreenshots" : false,
"vraLogs" : false,
"vropsLogs" : false,
"vrliLogs" : false,
"vrslcmLogs" : false
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 117
{
"description" : "Support-Bundle collection operation for SDDC",
"id" : "8a2f69a8-9f97-4ac3-8778-4aceb1640245"
}
- Poll the task until "status" is not "IN_PROGRESS" or not "PENDING" using the "id" from the previous response.
Tip : Refer to: Get the status of SOS SupportBundle Task..
If the "status" is "COMPLETED_WITH_SUCCESS", the task is completed successfully.
The task is failed if "status" is "COMPLETED_WITH_FAILURE".
Download the bundle after successful bundle creation, using the "id" from the previous response.
Tip : Refer to: Downloads the SOS Support bundle created.
2. Get the status of SOS SupportBundle Task.
The get health-summary operation
- Polls the status of SOS SupportBundle operation.
2.1. Prerequisites
The following data is required
- ID of the task
2.2. Steps
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/support-bundles/8a2f69a8-9f97-4ac3-8778-4aceb1640245' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/system/support-bundles/8a2f69a8-9f97-4ac3-8778-4aceb1640245 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: 341
{
"status" : "COMPLETED_WITH_SUCCESS",
"creationTimestamp" : "2021-07-09T06:22:32.856Z",
"description" : "Support-Bundle collection operation for SDDC",
"bundleAvailable" : "Yes",
"id" : "8a2f69a8-9f97-4ac3-8778-4aceb1640245",
"completionTimestamp" : "2021-07-09T06:23:04.949Z",
"bundleName" : "sos-2021-07-09-06-22-32-87667"
}
3. Downloads the SOS Support bundle created.
The download operation:
User can download the supportbundle bundle created.
The data is streamed in octect-stream format.
3.1. Prerequisites
The following data is required
- ID of the task
3.2. Steps
- Invoke the API.
Note : To trigger the API, the user should have a role of an ADMIN or OPERATOR in VCF.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/support-bundles/8a2f69a8-9f97-4ac3-8778-4aceb1640245/data' -i -X GET \
-H 'Accept: application/octet-stream' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/system/support-bundles/8a2f69a8-9f97-4ac3-8778-4aceb1640245/data HTTP/1.1
Accept: application/octet-stream
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
4. Get the status of all SOS SupportBundle collect tasks.
The get health-summary operation
- User can get the history of all SupportBundle tasks.
4.1. Prerequisites
The following data is required
- None
4.2. Steps
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/support-bundles' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/system/support-bundles 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: 738
{
"elements" : [ {
"status" : "COMPLETED_WITH_SUCCESS",
"creationTimestamp" : "2021-07-09T06:22:32.856Z",
"description" : "Support-Bundle collection operation for SDDC",
"bundleAvailable" : "No",
"id" : "8a2f69a8-9f97-4ac3-8778-4aceb1640245",
"completionTimestamp" : "2021-07-09T06:23:04.949Z",
"bundleName" : "sos-2021-07-09-06-22-32-87667"
}, {
"status" : "COMPLETED_WITH_SUCCESS",
"creationTimestamp" : "2021-07-09T06:23:55.973Z",
"description" : "Support-Bundle collection operation for SDDC",
"bundleAvailable" : "Yes",
"id" : "b65d036d-01cd-4238-929e-d94f87f9b894",
"completionTimestamp" : "2021-07-09T06:24:22.631Z",
"bundleName" : "sos-2021-07-09-06-23-55-87667"
} ]
}
5. Perform Health-Check operation for SDDC.
The Create Health Summary operation:
Validates overall health of system.
The health checks results are included in a archive file.
This can be downloaded by the user.
The result is health-summary bundle.
5.1. Prerequisites
The following data is optional
healthChecks
servicesHealth
ntpHealth
generalHealth
certificateHealth
passwordHealth
connectivityHealth
computeHealth
storageHealth
dnsHealth
composabilityHealth
hardwareCompatibilityHealth
versionHealth
scope
includeAllDomains
includeFreeHosts
domains
domainName
clusterNames
options
include
summaryReport
precheckReport
Note : To trigger the API, the user should have a role of an ADMIN or OPERATOR in VCF.
Note : User can also pass empty specification as data, then default health checks will be conducted.
Note : Only single domain is allowed in domain field, or user has to pass includeAllDomains as true.
Note : If no domain is passed default MANAGEMENT domain will be considered.
5.2. Steps
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/health-summary' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"options" : {
"config" : {
"skipKnownHostCheck" : false,
"force" : false
},
"include" : {
"summaryReport" : false,
"precheckReport" : false
}
},
"scope" : {
"includeFreeHosts" : false,
"includeAllDomains" : false,
"domains" : [ {
"domainName" : "sddcId-1001",
"clusterNames" : [ "SDDC-Cluster1" ]
} ]
},
"healthChecks" : {
"servicesHealth" : true,
"ntpHealth" : true,
"generalHealth" : true,
"certificateHealth" : true,
"passwordHealth" : true,
"connectivityHealth" : true,
"computeHealth" : true,
"storageHealth" : true,
"dnsHealth" : true,
"composabilityHealth" : true,
"hardwareCompatibilityHealth" : true,
"versionHealth" : true
}
}'
HTTP Request
POST /v1/system/health-summary HTTP/1.1
Content-Type: application/json
Content-Length: 766
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"options" : {
"config" : {
"skipKnownHostCheck" : false,
"force" : false
},
"include" : {
"summaryReport" : false,
"precheckReport" : false
}
},
"scope" : {
"includeFreeHosts" : false,
"includeAllDomains" : false,
"domains" : [ {
"domainName" : "sddcId-1001",
"clusterNames" : [ "SDDC-Cluster1" ]
} ]
},
"healthChecks" : {
"servicesHealth" : true,
"ntpHealth" : true,
"generalHealth" : true,
"certificateHealth" : true,
"passwordHealth" : true,
"connectivityHealth" : true,
"computeHealth" : true,
"storageHealth" : true,
"dnsHealth" : true,
"composabilityHealth" : true,
"hardwareCompatibilityHealth" : true,
"versionHealth" : true
}
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 104
{
"description" : "Health-Check operation for SDDC",
"id" : "beedc2ff-66d2-452f-af4b-176fa433148f"
}
- Poll the task until "status" is not "IN_PROGRESS" or not "PENDING" using the "id" from the previous response.
Tip : Refer to: Get a SOS HealthSummary Task.
If the "status" is "COMPLETED_WITH_SUCCESS", the task is completed successfully.
The task is failed if "status" is "COMPLETED_WITH_FAILURE".
Download the bundle after successful bundle creation, using the "id" from the previous response.
Tip : Refer to: Download Health Summary bundle.
6. Get the status of SOS health-summary task.
The get health-summary operation
- Polls the status of SOS health-summary operation.
6.1. Prerequisites
The following data is required
- ID of the task
6.2. Steps
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/health-summary/beedc2ff-66d2-452f-af4b-176fa433148f' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/system/health-summary/beedc2ff-66d2-452f-af4b-176fa433148f 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: 336
{
"status" : "COMPLETED_WITH_SUCCESS",
"creationTimestamp" : "2021-07-08T09:11:22.957Z",
"description" : "Health-Check operation for SDDC",
"bundleAvailable" : "Yes",
"id" : "beedc2ff-66d2-452f-af4b-176fa433148f",
"completionTimestamp" : "2021-07-08T09:12:12.336Z",
"bundleName" : "healthcheck-2021-07-08-09-11-22-91496"
}
7. Downloads the HealthSummary bundle created.
The download operation
User can download the health summary bundle created.
The data is streamed in octect-stream format.
7.1. Prerequisites
The following data is required
- ID of the task
7.2. Steps
- Invoke the API.
Note : To trigger the API, the user should have a role of an ADMIN or OPERATOR in VCF.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/health-summary/d14d42ea-3061-4874-a2ed-651253db37a3/data' -i -X GET \
-H 'Accept: application/octet-stream' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/system/health-summary/d14d42ea-3061-4874-a2ed-651253db37a3/data HTTP/1.1
Accept: application/octet-stream
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
8. Get the status of all SOS health-summary tasks.
The get health-summary operation
- User can get the history of all Health Summary tasks.
8.1. Prerequisites
The following data is required
- None
8.2. Steps
- Invoke the API.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/system/health-summary' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer etYWRta....'
HTTP Request
GET /v1/system/health-summary 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: 729
{
"elements" : [ {
"status" : "COMPLETED_WITH_SUCCESS",
"creationTimestamp" : "2021-07-08T09:11:22.957Z",
"description" : "Health-Check operation for SDDC",
"bundleAvailable" : "Yes",
"id" : "beedc2ff-66d2-452f-af4b-176fa433148f",
"completionTimestamp" : "2021-07-08T09:12:12.336Z",
"bundleName" : "healthcheck-2021-07-08-09-11-22-91496"
}, {
"status" : "COMPLETED_WITH_SUCCESS",
"creationTimestamp" : "2021-07-08T09:15:59.885Z",
"description" : "Health-Check operation for SDDC",
"bundleAvailable" : "Yes",
"id" : "212090e7-833e-4436-9136-f4a4f86277de",
"completionTimestamp" : "2021-07-08T09:16:46.701Z",
"bundleName" : "healthcheck-2021-07-08-09-15-59-91496"
} ]
}
Last updated 2022-09-28 17:42:27 PDT