Skip to content

Call the API with grpcurl or Postman

Both tools discover the API through server reflection: no code generation is needed.

Install grpcurl, then list the services and describe one:

Terminal window
grpcurl public.api.external-integration.ubikap.dev:443 list
grpcurl public.api.external-integration.ubikap.dev:443 describe services.file_object.v1.FileObjectService

Log in — LogIn needs no token:

Terminal window
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/LogIn

Then send the token in the authorization metadata:

Terminal window
TOKEN='<token returned by LogIn>'
grpcurl -H "authorization: Bearer $TOKEN" -d '{}' \
public.api.external-integration.ubikap.dev:443 services.file_object.v1.FileObjectService/Create

Add -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.

To work from the proto files instead, compile them with their dependencies into a descriptor set, and give it to grpcurl:

Terminal window
cd ubikap-public-api-proto
buf build -o ubikap-public-api.protoset
grpcurl -protoset ubikap-public-api.protoset public.api.external-integration.ubikap.dev:443 list
  1. New › gRPC, and enter public.api.external-integration.ubikap.dev:443 as the server URL.
  2. Click the lock icon next to the URL to enable TLS.
  3. In Service definition, choose Using server reflection — or import the .proto files of the archive.
  4. Pick a method, e.g. AuthenticationService / LogIn, and click Generate example message to fill the message as JSON.
  5. For every method but LogIn, open the Metadata tab and add the key authorization with the value Bearer <token>.
  6. Click Invoke. An error shows its status code and message.