// Document 1: authenticate and obtain a token
localhost:50051
auth.AuthService/Login
{
"login": "admin",
"password": "secret"
}
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"expires_in": 3600
}
token = .token
// Document 2: fetch user profile using the token
users.UserService/GetUser
Authorization: Bearer {{token}}
{
"user_id": 42
}
{
"id": 42,
"name": "Alice",
"email": "alice@example.com"
}
// Document 3: list orders with the same token
orders.OrderService/ListOrders
Authorization: Bearer {{token}}
{
"user_id": 42,
"limit": 10
}
{
"orders": [
{
"id": "ord-1",
"status": "delivered"
}
]
}
order_count = .orders | length
// Document 4: public settings endpoint (no auth required)
settings.SettingsService/GetPublicSettings
{}
{
"theme": "dark",
"language": "en"
}