Problem
The Google Docs API exposes each heading paragraph's auto-generated anchor id at paragraph.paragraphStyle.headingId — this is exactly what ...#heading=h.xxxx deep links resolve to. But gog docs headings list and gog docs paragraphs list (both -p and --json) omit it. Without it there is no way to build a deep link to a specific heading from gog output alone; you have to drop down to a raw Docs API client (documents.get(includeTabsContent=true)) just to read a field gog already has in hand.
Request
Surface headingId in:
gog docs headings list — per-heading object (at minimum in --json)
gog docs paragraphs list — per-paragraph object, when the paragraph carries one
Adjacent (same deep-linking use case)
The same "I have the element but cannot link to it" gap applies to the other anchorable targets the API already returns. Worth covering in one pass:
- bookmark ids (
bookmark / bookmarkId on a paragraph or text run) — for #bookmark=id links
- named ranges (
document.namedRanges)
Surfacing these lets a caller build any in-document deep link without a second API client.
Repro
gog docs headings list <docId> --json
# each heading object has index/start/end/style/text but no headingId
Version
gog 0.27.1
Problem
The Google Docs API exposes each heading paragraph's auto-generated anchor id at
paragraph.paragraphStyle.headingId— this is exactly what...#heading=h.xxxxdeep links resolve to. Butgog docs headings listandgog docs paragraphs list(both-pand--json) omit it. Without it there is no way to build a deep link to a specific heading from gog output alone; you have to drop down to a raw Docs API client (documents.get(includeTabsContent=true)) just to read a field gog already has in hand.Request
Surface
headingIdin:gog docs headings list— per-heading object (at minimum in--json)gog docs paragraphs list— per-paragraph object, when the paragraph carries oneAdjacent (same deep-linking use case)
The same "I have the element but cannot link to it" gap applies to the other anchorable targets the API already returns. Worth covering in one pass:
bookmark/bookmarkIdon a paragraph or text run) — for#bookmark=idlinksdocument.namedRanges)Surfacing these lets a caller build any in-document deep link without a second API client.
Repro
Version
gog 0.27.1