When utilizing the REST API to stop HCX services, administrators may encounter an HTTP 400 Bad Request (ErrorCode: 150704) if the services are stopped in the incorrect order.
HCX
This is expected behavior and is not a race condition. A strict service dependency exists between the Web and Plan services (introduced as part of the migration planning service). The HTTP 400 error is a deliberate, automated safeguard designed to enforce the correct operational shutdown sequence and maintain service integrity.
To avoid HTTP 400 errors, services must be manipulated in the following strict order:
Stopping Services:
The Plan service must be stopped first.
Once the Plan service is stopped, you may stop the Web engine service. (Note: If an API call attempts to stop the Web service while the Plan service is still actively running, the system will intentionally reject the request with the 150704 error).
Starting Services: The startup sequence is streamlined. Starting the Web service will automatically trigger the Plan service to start. There is no need to issue a separate, explicit API command to start the Plan service.