VCenter Connections Confirm Inventory Hold
A complete vCenter snapshot that would remove an empty or unusually large share of the connection's current hosts is not applied: the hosts it lists are updated and removal is held (inventoryHoldReason on the connection). This operation lets an administrator accept the removal. observedHostCount must equal inventoryHoldObservedHosts and holdId must equal inventoryHoldId. The audit record VCENTER_INVENTORY_REMOVAL_CONFIRMED is written first and the confirmation is armed only after that transaction commits. The worker re-reads the whole inventory on its next baseline (after the running long poll returns, up to about 90 seconds) and removes the missing hosts only if that new snapshot lists exactly the held hosts (same host set, not just the same count), the known host count is unchanged, the same vCenter is read and the confirmation has not expired (vtp.discovery.prune-guard.confirmation-ttl-minutes, default 10); the confirmation is single use and is cleared by any failure, stop or replacement hold, in which case the removal is held again with a new inventoryHoldId. A non-numeric id returns 400 INVALID_CONNECTION_ID, a missing or negative count 400 INVALID_OBSERVED_HOST_COUNT, a missing or blank holdId 400 INVALID_HOLD_ID, an unknown connection 404 CONNECTION_NOT_FOUND, no held removal 409 INVENTORY_HOLD_NOT_ACTIVE, a holdId that is not the current hold's (the hold changed since it was shown) 409 INVENTORY_HOLD_STALE and a different count 409 INVENTORY_HOLD_COUNT_MISMATCH. Requires the ADMIN role.
vCenter connection id
1
The host count (observedHostCount, a non-negative whole number equal to inventoryHoldObservedHosts) and the hold identifier (holdId, equal to inventoryHoldId) the administrator saw.
Show optional properties
{
"observedHostCount": 0,
"holdId": "string"
}
{
"observedHostCount": 0,
"holdId": "00000000-0000-4000-8000-000000000031"
}
The host count of the held snapshot, as read from inventoryHoldObservedHosts. It must equal the current hold's count
The hold the administrator saw, as read from inventoryHoldId. The confirmation applies only to that hold
204 No Content: the confirmation was recorded and a new baseline requested
400 Bad Request: INVALID_CONNECTION_ID, INVALID_OBSERVED_HOST_COUNT or INVALID_HOLD_ID
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
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.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
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 Unauthorized: UNAUTHENTICATED when the VTP_SESSION cookie is missing, unknown, expired or revoked
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
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.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
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 Forbidden: FORBIDDEN when the signed-in role is not ADMIN; 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)
{
"errorCode": "string",
"message": "string",
"path": "string",
"timestamp": "string",
"reason": "string"
}
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.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
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 Not Found: CONNECTION_NOT_FOUND
"ApiErrorResponse Object"
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.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
409 Conflict: INVENTORY_HOLD_NOT_ACTIVE, INVENTORY_HOLD_STALE or INVENTORY_HOLD_COUNT_MISMATCH
"ApiErrorResponse Object"
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.
Human-readable error description
Request URI path that produced the error
Timestamp when the error occurred as an ISO 8601 date-time with offset
A finer code, present only where an endpoint documents it. The Rule Pack endpoints' PACK_ENTRY_INVALID carries the import core's code here.
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"observedHostCount":"integer","holdId":"string"}' https://{api_host}/api/v1/vcenter-connections/{id}/inventory-hold/confirm