gRPC Mock API
API Information
Name: greeter
Version: 1.0
Protocol: gRPC
Description
This API provides access to mock user data via gRPC. The following proto file can be used for gRPC calls.
syntax = "proto3";
package public;
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHelloStreamReply (HelloRequest) returns (stream HelloReply) {}
rpc SayHelloBidiStream (stream HelloRequest) returns (stream HelloReply) {}
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
Authentication
OAuth2 Bearer Token, acquired using the OAuth client credentials flow:
- ACC:
https://api-acc.auth.schiphol.nl/oauth/token - PRD:
https://api.auth.schiphol.nl/oauth/token
Include the token in the Authorization header:
Authorization: Bearer <token>
Example Request
Save the proto file as for example sample_grpc.proto and then use below sample request
grpcurl \
-import-path . \
-proto sample_grpc.proto \
-H "authorization: Bearer {token}" \
-d '{"name": "Ali"}' \
-insecure \
{api-endpoint}:443 \
public.Greeter/SayHello