Call the gateway from the command line
List, describe and invoke the gateway's and its backends' services with grpcurl, or explore them in a browser with grpcui. How the gateway maps JSON to protobuf is in Calling the gateway.
# List and describe services through the gateway
grpcurl -plaintext localhost:5002 list
grpcurl -plaintext localhost:5002 describe virtufin.WorkManager
grpcurl -plaintext localhost:5002 describe virtufin.WorkManager.ListWorkers
grpcurl -plaintext localhost:5002 describe virtufin.ListWorkersRequest
# Invoke a backend method with JSON over gRPC
grpcurl -plaintext -d '{"service":"workmanager","method":"ListWorkers","request_data":"{}"}' \
localhost:5002 virtufin.Gateway/InvokeJson
For a remote endpoint, drop -plaintext and pass the key with
-H "x-api-key: $VIRTUFIN_API_KEY".
For an interactive explorer, run grpcui -plaintext localhost:5002 (or
bash common/scripts/run_grpcui_local.sh localhost:5002; TLS=true for a
remote TLS endpoint). Keep it loopback-only; see the
gRPC API explorer guide.