Routes
Routes has 2 operations in gum's generated catalog. Start with search when you know the task, use describe to inspect request fields and scopes, then dispatch through the command that matches the operation risk class.
| Count | Value |
|---|---|
| Family | Ads and maps |
| Operations | 2 |
| Risk classes | 2 read |
| Auth strategies | 2 api_key |
Start here
gum search "routes"
gum describe routes.computeRouteMatrix
gum read routes.computeRouteMatrix --args '{"fieldMask":"<fieldMask>"}' --output jsonAuth
Auth strategies in this service: 2 api_key. Authenticate the strategy used by the operation you plan to call.
API key
- In Google Cloud, enable Routes API.
- Create an API key. Restrict it to the API and to the hosts or referrers that should use it.
- Store the key in gum:
printf '%s' "$GOOGLE_API_KEY" | gum auth use-api-key --stdin- Verify with a read operation:
gum describe routes.computeRouteMatrix
gum read routes.computeRouteMatrix --args '{"fieldMask":"<fieldMask>"}' --output jsonService setup notes: Routes auth guide.
Operations
| Operation | Risk | Auth | Summary |
|---|---|---|---|
routes.computeRouteMatrix |
read |
api_key |
Routes API distance/time matrix (args.body: origins[], destinations[], travelMode). Requires fieldMask. |
routes.computeRoutes |
read |
api_key |
Routes API directions between an origin and destination (args.body: origin, destination, travelMode). Requires fieldMask. |
Next
- Use API workflows for search, describe, invoke, and error handling.
- Use Auth guides for service-specific Google setup.
- Use Command index for CLI flags and generated help.
