Hypervisors Api Sync Single Vib Inventory

Hypervisors Api Sync Single Vib Inventory
Refresh the agent software inventory of one hypervisor

On 404 and 409 the body is HypervisorVibSyncResponse (status NOT_FOUND or SKIPPED with a message), not ApiErrorResponse. Requires the ADMIN role.

Request
URI
POST
https://{api_host}/api/v1/hypervisors/{id}/sync-vib
COPY
Path Parameters
integer
id
Required  

Hypervisor key

id example
102

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The outcome of the sync for the host, which is SYNC_COMPLETED with its VIB status, or SERVICE_NOT_AVAILABLE when the inventory service is not available

Returns HypervisorVibSyncResponse of type(s) application/json
{
    "status": "SYNC_COMPLETED",
    "vibStatus": "INSTALLED",
    "identifier": "vtpsecurityagent",
    "version": "1.4.2"
}
string
status
Required  

Outcome of the sync: SYNC_COMPLETED (HTTP 200), SERVICE_NOT_AVAILABLE when the vCenter software inventory service is not available (HTTP 200), SKIPPED when the host is not discoverable (HTTP 409) or NOT_FOUND when the hypervisor does not exist (HTTP 404)

Enumeration: SYNC_COMPLETED, SERVICE_NOT_AVAILABLE, SKIPPED, NOT_FOUND
string
vibStatus
Optional

State of the agent VIB on a hypervisor host.

  • INSTALLED: The vCenter software inventory lists the VTP Agent VIB component on the host
  • NOT_INSTALLED: The software inventory succeeded and the VIB is absent; the Agent of such a host is reported OFFLINE
  • UNKNOWN: The software inventory is unavailable, for example it was not queried or the host does not support it (the initial value); previously stored VIB facts are kept
  • QUERY_FAILED: The vCenter query returned an error, timed out or could not connect; previously stored VIB facts are kept
Enumeration: INSTALLED, NOT_INSTALLED, UNKNOWN, QUERY_FAILED
string
identifier
Optional

Single-host refresh only

string
version
Optional

Single-host refresh only

string
failureReason
Optional

Reason the VIB query reported as failed; present only when status is SYNC_COMPLETED and the query reported one

string
message
Optional

Explanation of the outcome; present only when status is SKIPPED or NOT_FOUND


400

400 Bad Request: INVALID_ARGUMENT when the id path variable is not a number

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


401

401 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked

Returns Unauthenticated of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


403

403 Forbidden: FORBIDDEN or CSRF_ERROR. CSRF_ERROR when the X-XSRF-TOKEN header is missing or wrong on a POST, PUT, PATCH or DELETE (only POST /api/v1/auth/login is exempt, and a request without a valid session gets 401 UNAUTHENTICATED instead); PASSWORD_CHANGE_REQUIRED when the account must change its password first (only GET /api/v1/auth/session, POST /api/v1/auth/logout and POST /api/v1/auth/change-password are exempt); LICENSE_REQUIRED or LICENSE_EXPIRED while the license pool is restricted (no license, or expired past grace) (exempt: every route under /api/v1/auth, GET /api/v1/user/preferences, GET /api/v1/licensing/summary and POST /api/v1/licensing/licenses)

Returns ApiErrorResponse of type(s) application/json
{
    "errorCode": "string",
    "message": "string",
    "path": "string",
    "timestamp": "string",
    "reason": "string"
}
errorCode
Required  

Stable machine-readable error code. The known values are listed in ApiErrorCode; the set is not closed, so a client must tolerate an unlisted value.

string
message
Required  

Human-readable error description

string
path
Required  

Request URI path that produced the error

string As date-time As date-time
timestamp
Required  

Timestamp when the error occurred as an ISO 8601 date-time with offset

string
reason
Optional

A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.


404

404 Not Found: status NOT_FOUND with a message, sent when the id matches no hypervisor (also when the inventory service has no hypervisor repository). The body is HypervisorVibSyncResponse, not ApiErrorResponse, so it carries no errorCode

Returns HypervisorVibSyncResponse of type(s) application/json
{
    "status": "NOT_FOUND",
    "message": "Hypervisor 1 not found"
}
string
status
Required  

Outcome of the sync: SYNC_COMPLETED (HTTP 200), SERVICE_NOT_AVAILABLE when the vCenter software inventory service is not available (HTTP 200), SKIPPED when the host is not discoverable (HTTP 409) or NOT_FOUND when the hypervisor does not exist (HTTP 404)

Enumeration: SYNC_COMPLETED, SERVICE_NOT_AVAILABLE, SKIPPED, NOT_FOUND
string
vibStatus
Optional

State of the agent VIB on a hypervisor host.

  • INSTALLED: The vCenter software inventory lists the VTP Agent VIB component on the host
  • NOT_INSTALLED: The software inventory succeeded and the VIB is absent; the Agent of such a host is reported OFFLINE
  • UNKNOWN: The software inventory is unavailable, for example it was not queried or the host does not support it (the initial value); previously stored VIB facts are kept
  • QUERY_FAILED: The vCenter query returned an error, timed out or could not connect; previously stored VIB facts are kept
Enumeration: INSTALLED, NOT_INSTALLED, UNKNOWN, QUERY_FAILED
string
identifier
Optional

Single-host refresh only

string
version
Optional

Single-host refresh only

string
failureReason
Optional

Reason the VIB query reported as failed; present only when status is SYNC_COMPLETED and the query reported one

string
message
Optional

Explanation of the outcome; present only when status is SKIPPED or NOT_FOUND


409

409 Conflict: status SKIPPED with a message, sent when the refresh is skipped: the VIB query returned no information, its source or host reference no longer matches the host, or the host is no longer discoverable on its vCenter connection. The body is HypervisorVibSyncResponse, not ApiErrorResponse, so it carries no errorCode

Returns HypervisorVibSyncResponse of type(s) application/json
{
    "status": "SKIPPED",
    "message": "VIB query returned null"
}
string
status
Required  

Outcome of the sync: SYNC_COMPLETED (HTTP 200), SERVICE_NOT_AVAILABLE when the vCenter software inventory service is not available (HTTP 200), SKIPPED when the host is not discoverable (HTTP 409) or NOT_FOUND when the hypervisor does not exist (HTTP 404)

Enumeration: SYNC_COMPLETED, SERVICE_NOT_AVAILABLE, SKIPPED, NOT_FOUND
string
vibStatus
Optional

State of the agent VIB on a hypervisor host.

  • INSTALLED: The vCenter software inventory lists the VTP Agent VIB component on the host
  • NOT_INSTALLED: The software inventory succeeded and the VIB is absent; the Agent of such a host is reported OFFLINE
  • UNKNOWN: The software inventory is unavailable, for example it was not queried or the host does not support it (the initial value); previously stored VIB facts are kept
  • QUERY_FAILED: The vCenter query returned an error, timed out or could not connect; previously stored VIB facts are kept
Enumeration: INSTALLED, NOT_INSTALLED, UNKNOWN, QUERY_FAILED
string
identifier
Optional

Single-host refresh only

string
version
Optional

Single-host refresh only

string
failureReason
Optional

Reason the VIB query reported as failed; present only when status is SYNC_COMPLETED and the query reported one

string
message
Optional

Explanation of the outcome; present only when status is SKIPPED or NOT_FOUND


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' https://{api_host}/api/v1/hypervisors/{id}/sync-vib