Skip to Content
Advanced FeaturesProtobuf Support

Protobuf Support

APXY can decode Protocol Buffer (Protobuf) encoded request and response bodies when you provide the corresponding .proto schema files. This makes it possible to inspect gRPC and other Protobuf-based API traffic in human-readable form.

CLI

Register a schema

# From a file apxy tools protobuf add-schema \ --name "user-service" \ --file ./protos/user.proto # From inline content apxy tools protobuf add-schema \ --name "order-service" \ --content 'syntax = "proto3"; message Order { string id = 1; int32 amount = 2; }'
FlagDefaultDescription
--nameSchema name (required)
--filePath to a .proto file (mutually exclusive with --content)
--contentInline proto definition (mutually exclusive with --file)

List registered schemas

apxy tools protobuf list-schemas

Remove a schema

apxy tools protobuf remove-schema --id <schema-id>

Decode a traffic record

Decode the Protobuf body of a captured request or response:

# Decode the request body apxy tools protobuf decode --id <record-id> --scope request # Decode the response body apxy tools protobuf decode --id <record-id> --scope response
FlagDefaultDescription
--idTraffic record ID (required)
--scoperesponserequest or response

Use Cases

Inspect gRPC traffic

Register your service protos and decode gRPC request/response bodies:

apxy tools protobuf add-schema --name "my-service" --file ./proto/service.proto # Capture some gRPC traffic, then: apxy tools protobuf decode --id <record-id> --scope response

Debug mobile app APIs

Many mobile apps use Protobuf for compact payloads. Register the schema and decode traffic to see what’s being sent:

apxy tools protobuf add-schema --name "mobile-api" --file ./proto/mobile.proto apxy tools protobuf decode --id <record-id> --scope request
Last updated on