method

GetUser

acme.user.v1.UserService.GetUser

Fetch a user by id.

HTTP example

For a deployment at https://api.example.com, the binding maps to:

curl --request GET \
  'https://api.example.com/v1/users/550e8400-e29b-41d4-a716-446655440000'

The request id must be a UUID. The response wraps the account in user. This method is marked NO_SIDE_EFFECTS.

RPC on UserService

rpc GetUser(acme.user.v1.GetUserRequest) returns (acme.user.v1.GetUserResponse);

NO_SIDE_EFFECTS

Options

idempotency_level
idempotency_level = NO_SIDE_EFFECTS
HTTP — GET /v1/users/{id}
GET
(google.api.http) = { get: "/v1/users/{id}" }

Request

acme.user.v1.GetUserRequest

FieldNumberTypeCardinalityValidationDescription
id1stringimplicit
string.uuid
—
Details
  • JSON name: id
  • Presence: IMPLICIT
  • Annotations: REQUIRED
(buf.validate.field) = {
  string: {
    uuid: true
  }
}
(google.api.field_behavior) = [
  REQUIRED
]

Response

acme.user.v1.GetUserResponse

FieldNumberTypeCardinalityValidationDescription
user1acme.user.v1.Useroptional——
Details
  • JSON name: user
  • Presence: EXPLICIT