Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
75 lines (59 loc) · 2.97 KB

File metadata and controls

75 lines (59 loc) · 2.97 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

Raw API Dumps

read_when:

  • Using gog <service> raw commands for lossless Google API JSON.
  • Passing Google API responses into scripts, debuggers, or LLM workflows.
  • Reviewing sensitive-field behavior for raw output.

Raw commands return the canonical Google API response shape instead of gog's normal curated table/JSON output. They are useful when a script needs a field that gog does not model yet, or when debugging an API object exactly as Google returns it.

Commands

Examples

gog drive raw <fileId> --pretty
gog docs raw <docId> --json > doc-api.json
gog docs raw <docId> --tab "Notes" --pretty
gog docs raw <docId> --all-tabs --json > doc-tabs-api.json
gog gmail raw <messageId> --format metadata --json
gog sheets raw <spreadsheetId> --include-grid-data --json

gog docs raw --tab resolves a tab title or ID and projects that tab into the legacy top-level Document fields such as body, lists, and inlineObjects. --all-tabs keeps the canonical Documents.Get response and populates its recursive tabs tree. Without either flag, the command keeps the existing first-tab response.

Use service-native field masks when available:

gog drive raw <fileId> --fields 'id,name,mimeType,owners(emailAddress)' --json
gog contacts raw people/c123 --person-fields names,emailAddresses,phoneNumbers --json

Safety Model

Raw output is intentionally less opinionated than normal gog output. It may include private document content, contact data, event attendees, Gmail payloads, or service-specific metadata.

Drive has the highest capability-URL risk. By default, gog drive raw redacts fields such as thumbnailLink, webContentLink, exportLinks, resourceKey, properties, appProperties, and embedded thumbnail bytes unless the user explicitly names fields via --fields.

Sheets warns when grid data or developer metadata could expose sensitive data, but keeps output lossless. Docs and Slides may include short-lived image URLs.

For the full sensitive-field review, read Raw API Sensitive Field Audit.

Automation Tips

  • Prefer --json for scripts.
  • Prefer --pretty for humans.
  • Use --wrap-untrusted when raw/fetched output will be pasted into an LLM or agent context. It preserves IDs and URLs while marking fetched free-text fields as external untrusted content.
  • Use narrow --fields or service-specific field masks whenever possible.
  • Do not pipe raw output into logs or LLMs unless you are comfortable with the object's full Google API payload.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.