#!/bin/bash # Example: Send email via notification service (X-Service routing) BASE_URL="${1:-https://api.riotpiao.com}" AUTH_TOKEN="${2:-}" # Send email curl -s -X POST "$BASE_URL" \ -H "X-Service: notification" \ -H "X-Resource: send-email" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AUTH_TOKEN" \ -d '{ "to": "admin@example.com", "cc": "ops-team@example.com", "subject": "System Alert", "body": "CPU usage exceeded 90% threshold" }' | jq . echo ""