Skip to main content

Module api

Module api 

Source
Expand description

grr api — the discovery-driven escape hatch.

grr api call <id> reaches every method Google publishes across the 14 APIs in the committed Discovery index — including anything released after grr was built, with no code change and no new release. The generated service tree (src/commands/generated.rs, dispatched by gen_dispatch.rs) is the same engine with a friendlier shape: both funnel through [call_method], so a dry-run of the same method and parameters is byte-identical either way.

grr api list                                    # every method
grr api list gmail --filter list                # just Gmail listing methods
grr api describe gmail.users.messages.list      # params + scopes
grr api call gmail.users.messages.list --param userId=me --param 'q=is:unread'
grr api call drive.files.list --params '{"pageSize":10}'
grr gmail users messages list --user-id me      # the same call, generated

The login, not this command, decides the grant: grr auth login requests a small 11-scope default, --service <name> adds one service’s scopes and --all-scopes the whole index — the sets and the reasoning behind them live in core::auth. A method outside the current grant answers 403 naming the scope; widen the grant and retry.

Structs§

ApiCallArgs
ApiDescribeArgs
ApiListArgs
ApiRefreshArgs

Enums§

ApiCommands

Functions§

handle_api_cmd