Endpoints Operations Unenroll

Endpoints Operations Unenroll
Unenroll an endpoint

Resets the enrollment of the host that runs the endpoint. The path /api/v1/endpoints/{id}/reset-enrollment is an alias of this operation. Requires the ADMIN role.

Request
URI
POST
https://{api_host}/api/v1/endpoints/{id}/unenroll
COPY
Path Parameters
string
id
Required  

Endpoint id (string-serialized 64-bit agent id)

id example
2
Query Parameters
boolean
force
Optional
Constraints: default: false

Proceed when the remote agent identity cannot be confirmed removed


Authentication
This operation uses the following authentication methods.
Responses
200

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

Returns HypervisorEnrollmentStatusDto of type(s) application/json
{
    "hypervisorPk": 102,
    "agentId": null,
    "enrollmentStatus": "NOT_ENROLLED",
    "enrolledAt": null,
    "enrollmentError": null,
    "enrollmentStage": "NONE",
    "offboardOutcome": "REMOTE_CONFIRMED"
}
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_ENDPOINT_ID

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: ENDPOINT_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.


409

409 Conflict: RECOVERY_REQUIRED or ENROLLMENT_RESET_CONFLICT

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 -X POST -H 'Authorization: <value>' https://{api_host}/api/v1/endpoints/{id}/unenroll