Usage
Options
Force stop the simulator even if it’s in an inconsistent state. Use this when normal shutdown fails.
Path to the configuration file (global option).
Execution mode override:
ci, development, or debug (global option).Show what would be executed without actually stopping the simulator (global option).
Enable verbose output for detailed logging (global option).
Path to the SQLite database for simulator storage (global option).
Examples
Stop the simulator
Force stop the simulator
Dry run mode
How it works
When you runsimulator stop:
- The command checks if the simulator is currently active
- If active, it sends a shutdown signal to all running services
- Each service is gracefully stopped in sequence
- Resources are cleaned up and ports are released
- The simulator process terminates
If you started the simulator with
simulator start, pressing Ctrl+C will also stop it gracefully. The stop command is useful when the simulator is running in the background or you need to script shutdown operations.Related commands
simulator start- Start the API simulatorsimulator status- Check if simulator is runningsimulator logs- View logs before stopping
Troubleshooting
Simulator won’t stop
If the simulator doesn’t respond to the stop command:- Use
--forceto force shutdown - Check for zombie processes:
ps aux | grep apicentric - Manually kill the process if needed:
kill <PID>
Configuration error
If you see “API simulator is not enabled or configured”:- Verify your
apicentric.jsonconfiguration - Check that you’re in the correct directory
- Use
--configto specify the config file path