Register a new service instance with the registry.

Request

curl -X POST http://localhost:8080/register \
  -H "Content-Type: application/json" \
  -d '{"name":"ms.auth","host":"10.0.0.5","port":3001,"health_url":"/health"}'

Body

FieldTypeRequiredDescription
namestringyesService name (used in URL path)
hoststringyesInstance hostname or IP
portintyesInstance port
health_urlstringnoPath for health checks (e.g. /health)

Response

{"instance_id":"10.0.0.5:3001","ttl_seconds":15}

The instance is now registered with a 15-second TTL. Send heartbeats to keep it alive.