Hypervisors Api Get Enrollment Status

Hypervisors Api Get Enrollment Status
Get the enrollment status of a hypervisor

Requires the ADMIN, SECURITY_OPERATOR or AUDITOR role.

Request
URI
GET
https://{api_host}/api/v1/hypervisors/{id}/enrollment
COPY
Path Parameters
integer
id
Required  

Hypervisor key

id example
103

Authentication
This operation uses the following authentication methods.
Responses
200

200 OK successful response envelope. The enrollment status of the host

Returns HypervisorEnrollmentStatusDto of type(s) application/json
{
    "hypervisorPk": 103,
    "agentId": null,
    "enrollmentStatus": "NOT_ENROLLED",
    "enrolledAt": null,
    "enrollmentError": "Forced reset without remote Agent confirmation: UNENROLL UNCONFIRMED: no Agent identity recorded for this host",
    "enrollmentStage": "NONE",
    "offboardOutcome": "FORCED_UNCONFIRMED"
}
integer As int64 As int64
hypervisorPk
Required  

Identifier of the hypervisor the status belongs to

string As ^[0-9]+$
agentId
Optional

Identifier of the Agent bound to the host, as a decimal string (a 64-bit value, sent as a string because browsers cannot hold it exactly as a number); null after a reset or unenroll, which unbinds the Agent

string
enrollmentStatus
Required  

Agent enrollment status of a hypervisor host.

  • NOT_ENROLLED: No enrollment: the initial value of every host and the value after an enrollment reset or unenroll
  • ENROLLING: An Agent identity was allocated and the enrollment commands were sent; the host awaits the Agent's first heartbeat
  • ENROLLED: The Agent's first heartbeat after enrollment promoted the host from ENROLLING
  • FAILED: An enrollment step failed, the enrollment deadline passed while ENROLLING, or an unenroll could not be completed remotely (stage RECOVERY_REQUIRED)
  • UNENROLLED: No behaviour is documented for this value. No producing site in the current server code
Enumeration: NOT_ENROLLED, ENROLLING, ENROLLED, FAILED, UNENROLLED
string As date-time As date-time
enrolledAt
Optional

Time the host became ENROLLED; null while it is not enrolled

string
enrollmentError
Optional

Error text of the last enrollment failure or forced reset; null when there is none

string
enrollmentStage
Required  

Stage of the agent enrollment of a hypervisor host.

  • NONE: No enrollment step has run; the initial value and the value after an enrollment reset
  • AUTHORIZING: The Console is authenticating to the ESXi host to obtain a bearer token
  • CSR_REQUESTED: The Console asked the host's Agent to start enrollment and awaits its certificate signing request (CSR)
  • CSR_RECEIVED: The Agent returned a certificate signing request
  • CERT_SIGNED: The Console signed the Agent's certificate signing request
  • CERT_DELIVERED: The signed certificate was delivered to the Agent
  • AWAITING_HEARTBEAT: The certificate delivery was recorded and the host awaits the Agent's first heartbeat
  • ENROLLED: The Agent's first heartbeat promoted the host; set together with status ENROLLED
  • RECOVERY_REQUIRED: An unenroll could not be completed remotely and was not forced; the host keeps status FAILED and its Agent binding until the enrollment is reset with force=true
  • FAILED: An enrollment step failed or the enrollment deadline passed while ENROLLING
Enumeration: NONE, AUTHORIZING, CSR_REQUESTED, CSR_RECEIVED, CERT_SIGNED, CERT_DELIVERED, AWAITING_HEARTBEAT, ENROLLED, RECOVERY_REQUIRED, FAILED
offboardOutcome
Optional

What a reset or unenroll established about the remote Agent: always set on a reset or unenroll response; on a status read it is set only when the stored row proves FORCED_UNCONFIRMED or RECOVERY_REQUIRED and is otherwise null; null never means the Agent confirmed anything, and even REMOTE_CONFIRMED only means the Agent answered the UNENROLL command


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

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: HYPERVISOR_NOT_FOUND

Returns ApiErrorResponse of type(s) application/json
"ApiErrorResponse Object"
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.


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