Call the API with grpcurl or Postman
Both tools discover the API through server reflection: no code generation is needed.
grpcurl
Section titled “grpcurl”Install grpcurl, then list the services and describe one:
grpcurl public.api.external-integration.ubikap.dev:443 listgrpcurl public.api.external-integration.ubikap.dev:443 describe services.file_object.v1.FileObjectServiceLog in — LogIn needs no token:
grpcurl -d '{ "officeScope": { "target": { "office": { "key": "OFC_1234" } } }, "userUuid": "01920000-0000-7000-8000-000000000000", "userCode": "12345678"}' public.api.external-integration.ubikap.dev:443 services.authentication.v1.AuthenticationService/LogInThen send the token in the authorization metadata:
TOKEN='<token returned by LogIn>'
grpcurl -H "authorization: Bearer $TOKEN" -d '{}' \ public.api.external-integration.ubikap.dev:443 services.file_object.v1.FileObjectService/CreateAdd -max-time 30 to give the call a deadline. The API reference shows a ready-to-edit grpcurl command for every RPC: pick grpcurl in its client list.
Without reflection
Section titled “Without reflection”To work from the proto files instead, compile them with their dependencies into a descriptor set, and give it to grpcurl:
cd ubikap-public-api-protobuf build -o ubikap-public-api.protosetgrpcurl -protoset ubikap-public-api.protoset public.api.external-integration.ubikap.dev:443 listPostman
Section titled “Postman”- New › gRPC, and enter
public.api.external-integration.ubikap.dev:443as the server URL. - Click the lock icon next to the URL to enable TLS.
- In Service definition, choose Using server reflection — or import the
.protofiles of the archive. - Pick a method, e.g.
AuthenticationService / LogIn, and click Generate example message to fill the message as JSON. - For every method but
LogIn, open the Metadata tab and add the keyauthorizationwith the valueBearer <token>. - Click Invoke. An error shows its status code and message.