Skip to main content
Check the status of the API simulator, including which services are running and their configuration details.

Usage

apicentric simulator status [OPTIONS]

Options

--detailed
boolean
default:"false"
Show detailed information about each running service, including port numbers, base paths, endpoint counts, and running status.
--config
string
default:"apicentric.json"
Path to the configuration file (global option).
--mode
string
Execution mode override: ci, development, or debug (global option).
--dry-run
boolean
default:"false"
Show what would be executed without actually checking status (global option).
--verbose
boolean
default:"false"
Enable verbose output for detailed logging (global option).
--db-path
string
default:"apicentric.db"
Path to the SQLite database for simulator storage (global option).

Examples

Check basic status

apicentric simulator status
Example output when running:
πŸ“Š API Simulator Status
   Status: 🟒 Running
   Services: 3 total
   Active Services: 3
Example output when stopped:
πŸ“Š API Simulator Status
   Status: πŸ”΄ Stopped
   Services: 0 total
   Active Services: 0
Example output when not configured:
πŸ“Š API Simulator Status
   Status: βšͺ Not configured
   πŸ’‘ Enable simulator in apicentric.json to see status

Check detailed status

apicentric simulator status --detailed
Example output:
πŸ“Š API Simulator Status
   Status: 🟒 Running
   Services: 3 total
   Active Services: 3

πŸ“‹ Service Details:
   - users (port 8001 base /api/v1) endpoints:5 running:yes
   - products (port 8002 base /api) endpoints:8 running:yes
   - orders (port 8003 base /v1) endpoints:6 running:yes

Dry run mode

apicentric simulator status --dry-run
Example output:
πŸƒ Dry run: Would show simulator status (detailed=false)

Status indicators

The status command displays the following information:

Basic status

  • 🟒 Running - Simulator is active and services are running
  • πŸ”΄ Stopped - Simulator is not running
  • βšͺ Not configured - Simulator is not enabled in configuration

Service metrics

  • Services - Total number of service definitions loaded
  • Active Services - Number of services currently running

Detailed information (with --detailed)

For each service:
  • Name - Service identifier
  • Port - HTTP port the service is listening on
  • Base path - URL path prefix for all endpoints
  • Endpoints - Number of endpoints defined in the service
  • Running - Whether the service is currently active

Use cases

Quick health check

apicentric simulator status
Use this in scripts or CI/CD pipelines to verify the simulator is running.

Debugging service configuration

apicentric simulator status --detailed
View detailed service information to troubleshoot port conflicts or configuration issues.

Monitor in scripts

if apicentric simulator status | grep -q "🟒 Running"; then
  echo "Simulator is ready"
else
  echo "Starting simulator..."
  apicentric simulator start --services-dir ./services
fi
The status command provides a snapshot of the current state. For real-time monitoring of requests and responses, use the simulator logs command with the --follow option or the simulator monitor command.

Troubleshooting

Status shows β€œNot configured”

Ensure your apicentric.json has simulator configuration:
{
  "simulator": {
    "enabled": true
  }
}

Services show as total but not active

This indicates services are defined but not running. Check:
  • Port availability conflicts
  • Service definition validation
  • Simulator logs for startup errors

Build docs developers (and LLMs) love