examples Protocols
grpc.http
gRPC with server reflection, metadata and a plaintext override, and a call that reads a local .proto file.
needs your own server
resterm run --request GrpcReportStatus _examples/grpc.httpRun this from the root of a clone of the Resterm repository.
Editor
gRPC docs### Generate Report Over gRPC
# @name GrpcGenerateReport
# @tag grpc reports
# @description Demonstrates @grpc metadata, reflection, and plaintext override.
# @grpc analytics.ReportingService/GenerateReport
# @grpc-reflection true
# @grpc-plaintext true
# @grpc-authority {{grpc.authority}}
# @grpc-metadata x-trace-id: {{$uuid}}
GRPC {{grpc.host}}
{
"tenantId": "{{tenant.id}}",
"reportId": "rep-{{$uuid}}",
"includeHistorical": true
}
### Fetch Report Status With a Proto File
# @name GrpcReportStatus
# @tag grpc reports
# @description Uses a local proto file and additional metadata.
# @grpc analytics.ReportingService/GetReportStatus
# @grpc-proto ./proto/analytics.proto
# @grpc-metadata authorization: Bearer {{auth.token}}
GRPC {{grpc.host}}
{
"reportId": "rep-{{$uuid}}"
}syntax = "proto3";
package analytics;
service ReportingService {
rpc GenerateReport(GenerateReportRequest) returns (Report);
rpc GetReportStatus(GetReportStatusRequest) returns (ReportStatus);
}
message GenerateReportRequest {
string tenant_id = 1;
string report_id = 2;
bool include_historical = 3;
}
message Report {
string report_id = 1;
}
message GetReportStatusRequest {
string report_id = 1;
}
message ReportStatus {
string report_id = 1;
string status = 2;
}