GET
/api/google-docs/filesDrive files list (files.list)
Google Drive files.list — listing of pharma team shared documents.
Mocks Drive API v3 files.list. Returns 18 realistic shared docs spanning launch tracking (launch plan, weekly tracker, district performance), market access (payer landscape brief, formulary win/loss log, IRA analysis), submissions (NICE submission plan, evidence dossier index, gap report), competitive intel (ASCO readout, KOL adv board, competitor tracker), and strategic (2026 commercial plan, LCM roadmap).
Query parameters
| Name | Type | Description |
|---|---|---|
q | string | Drive-style query. Supports `name contains 'foo'`, `category = 'launch-tracking'`, or free text. |
page_size | integer | Max files returned. 1-100. default: 100 |
Response schema
| Path | Type | Description |
|---|---|---|
kind | string | 'drive#fileList'. |
files[] | array | Drive File resources. |
files[].id | string | Drive file ID (44 chars, starts with '1', base64url alphabet). |
files[].name | string | Document display name. |
files[].mimeType | string | Always 'application/vnd.google-apps.document' (Google Doc native). Source: Drive MIME types guide |
files[].description | string | 1-2 sentence summary. |
files[].category | enum | launch-tracking | market-access | submissions | competitive-intel | strategic. Custom team-tagging field; not part of Drive API. |
files[].ownerRole | string | Role of the owner — VP Commercial, HEOR Director, etc. Custom field. |
files[].createdTime / modifiedTime / modifiedByMeTime / viewedByMeTime | string (RFC 3339) | Drive timestamps. |
files[].owners[] | array | { displayName, emailAddress, kind: 'drive#user', photoLink }. |
files[].lastModifyingUser | object | Same shape as owners[]. |
files[].parents[] | string[] | Folder IDs. |
files[].webViewLink | string | https://docs.google.com/document/d/{id}/edit URL. |
files[].permissions[] | array | { id, kind, type: user|group|domain|anyone, role: owner|writer|commenter|reader, ... }. Source: Drive Permissions resource |
files[].capabilities | object | canEdit, canComment, canShare. |
nextPageToken | string | null | Pagination token. |
incompleteSearch | boolean | Drive flag. |
Behaviour notes
- ·All files are Google Docs (no Sheets / Slides in this mock).
- ·File IDs start with '1' and use the 44-char base64url alphabet.
- ·Drive query syntax supported: name contains 'X', category = 'Y', or free-text fallback.
Examples
All shared docs
curl 'http://localhost:3000/api/google-docs/files'Search by name
curl "http://localhost:3000/api/google-docs/files?q=name+contains+'NICE'"Filter by category
curl "http://localhost:3000/api/google-docs/files?q=category+%3D+'submissions'"Sources
- Drive API v3 — files.listhttps://developers.google.com/drive/api/reference/rest/v3/files/list
- Drive API v3 — File resourcehttps://developers.google.com/drive/api/reference/rest/v3/files
- Drive API v3 — Permissions resourcehttps://developers.google.com/drive/api/reference/rest/v3/permissions
- Drive MIME typeshttps://developers.google.com/workspace/drive/api/guides/mime-types