Health Check — Move REST API on Movement
Check the health and availability of Movement's Move REST API service. Includes monitoring patterns, alerting integration, and uptime best practices.
Overview
The health endpoint provides a lightweight way to verify that the Movement REST API service is running and responsive. Healthy responses return HTTP 200 with a short JSON body indicating node readiness. This endpoint is essential for monitoring, load balancer health probes, alerting systems, and pre-flight checks in your application startup logic.
On Dwellir Movement mainnet, the live path is /-/healthy. The older /-/health route currently returns 404.
Unlike data-fetching endpoints, the health check is lightweight. In practice, poll every 5-10 seconds and add retry/backoff handling so shared-rate-limit keys stay resilient.
Endpoint
GET /v1/-/healthyBase URL: https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1
Code Examples
Basic Health Check
# Simple health check -- returns HTTP status code
curl -s -o /dev/null -w "%{http_code}" \
"https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1/-/healthy"
# Output: 200
# Health check with response body
curl -s "https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1/-/healthy"
# Output: {"message":"aptos-node:ok"}
# Check that node has received a block in the last 30 seconds
curl -s -w "\nHTTP %{http_code}" \
"https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1/-/healthy?duration_secs=30"Continuous Monitoring Script
Application Startup Pre-Flight Check
Common Use Cases
Load Balancer Health Probes
Configure your load balancer (AWS ALB, nginx, HAProxy) to hit /v1/-/healthy every 5-10 seconds. Route traffic only to healthy backends. Use duration_secs=30 to automatically remove stale nodes from rotation.
CI/CD Deployment Verification
After deploying a new version of your application, run a health check against the Movement endpoint to verify connectivity. Fail the deployment pipeline if the node is unreachable.
Multi-Endpoint Failover
If you use multiple RPC endpoints (primary and backup), check health before each request and failover to the backup if the primary is unhealthy. This pattern provides high availability for production applications.
Integration Patterns
Kubernetes Liveness/Readiness Probes
# Example Kubernetes probe configuration for an app that depends on Movement
livenessProbe:
httpGet:
path: /internal/health # Your app's health endpoint that checks Movement
port: 8080
initialDelaySeconds: 10
periodSeconds: 15
readinessProbe:
httpGet:
path: /internal/ready # Checks Movement node connectivity
port: 8080
initialDelaySeconds: 5
periodSeconds: 10Prometheus Metrics
Expose health check results as Prometheus metrics for dashboarding and alerting:
# Example: expose Movement health as a Prometheus gauge
from prometheus_client import Gauge
import requests
movement_health = Gauge("movement_node_healthy", "Movement node health status")
movement_latency = Gauge("movement_health_latency_ms", "Health check latency")
def update_metrics():
try:
start = time.time()
resp = requests.get(f"{BASE}/-/healthy?duration_secs=30", timeout=5)
movement_latency.set((time.time() - start) * 1000)
movement_health.set(1 if resp.status_code == 200 else 0)
except Exception:
movement_health.set(0)Related Endpoints
GET /v1-- Get ledger information including current block height and chain ID.GET /v1/accounts/{address}-- Query account information (a deeper connectivity test).POST /v1/transactions/simulate-- Simulate a transaction (verifies full node functionality).