GCP APIs: Custom Date & Request Total
Overview
Choose a custom date range on the GCP APIs & Services dashboard and see the total of all API requests for that period.
Choose a custom date range on the GCP APIs & Services dashboard and see the total of all API requests for that period. πποΈ GCP APIs: Custom Date & Request Total π A Chrome extension for the Google Cloud **APIs & Services** dashboard that lets you choose a **custom date range** (and console presets) and see the **total of all API requests** for that periodβwithout leaving the page. π Features β¨ - **Custom date range** β Pick any start/end date and apply it to the GCP APIs dashboard in one click (the main feature not available in the console by default). β - **Console presets** β Same ranges as the console: 1h, 6h, 12h, 1d, 2d, 4d, 7d, 14d, 30d, plus **Custom** (highlighted in the UI). π - **Total requests** β Reads the Requests column from the dashboard table, sums all APIs, and shows: - **In the popup** β "Total requests (this period)" with a Refresh button. π - **On the page** β A blue badge in the top-right with the same total. π·οΈ - **Heartbeat** β While the popup is open on the dashboard, the extension polls every 5 seconds and stops when the total is stable (last 3 fetches match). A **green pulsing dot** means "updating"; a **red dot** means "idle". π - **Account & project preserved** β Applying a date range keeps your current `authuser` and `project` in the URL. π - **Sync with console** β If you change the range in the console (e.g. 14 days), the extension reflects it when you open the popup. π - **Overlay off-dashboard** β When you open the extension on a non-GCP URL, an overlay explains that you need to be on the APIs dashboard and provides a link to open it. π± Quick start β‘ From Chrome Web Store π 1. Open the [Chrome Web Store](https://chrome.google.com/webstore) and search for **GCP APIs** or **Custom Date Request Total**. 2. Click **Add to Chrome** and confirm permissions. Manual installation (developers) π» 1. **Clone the repo** ```bash git clone https://github.com/vikashsparxit/gcp-api-date-picker.git cd gcp-api-date-picker ``` 2. **Load in Chrome** - Go to `chrome://extensions/` - Turn on **Developer mode** (top right) - Click **Load unpacked** and select the extension folder 3. **Use it** - Open [Google Cloud Console β APIs & Services](https://console.cloud.google.com/apis/dashboard) - Click the extension icon - Choose a preset (e.g. 30d) or **Custom** and set start/end dates - Click **Apply Date Range** - See **Total requests (this period)** in the popup and on the page (blue badge) π Project structure π ``` gcp-api-date-picker/ βββ manifest.json # Extension config (MV3), permissions, content scripts βββ popup.html # Popup UI (presets, date inputs, total requests, overlay) βββ popup.js # Popup logic, URL building, heartbeat, storage βββ content.js # Injects "Custom Date Range" button + total-requests badge on dashboard βββ getTotalRequests.js # Sums Requests column from visible tables/grids on the page βββ style.css # Styles for injected dashboard UI βββ icons/ # Extension icons (16, 48, 128) βββ README.md βββ LICENSE # MIT ``` How it works βοΈ - **Date range** β The GCP console encodes the range in the `pageState` query parameter (e.g. `groupValue` for presets like `P30D`, or `customValue` with `start`/`end`). The extension builds this URL, keeps `authuser` and `project`, and navigates the tab so the dashboard reloads with the new range. - **Total requests** β A content script runs on the APIs dashboard, finds tables/grids with a "Requests" column, sums the values (preferring the table with the most data rows), and optionally uses a higher "Total requests: N" from the page when present. The result is shown in the on-page badge and sent to the popup on request; the popup also runs a heartbeat (poll every 5s, stop when stable) and shows a green/red status dot. Permissions π - **`storage`** β Store last-used dates and preferences. - **`tabs`** β Detect the active tab and update its URL when applying a date range. - **`host_permissions`: `https://console.cloud.google.com/*`** β Run only on the Cloud Console. No external servers; everything runs in your browser. π Troubleshooting π οΈ | Issue | What to try | |-------|-------------| | Extension doesn't do anything | Make sure the current tab is `console.cloud.google.com/apis/dashboard`. | | Total requests wrong or stale | Click **Refresh** in the popup, or wait for the heartbeat (green dot) to settle. | | Wrong account/project after Apply | This build keeps `authuser` and `project` from the current URL; if it still switches, open the dashboard in the correct account first, then use the extension. | | No blue badge on page | Reload the APIs dashboard and open the extension again; the badge is injected by the content script. | Contributing π€ 1. Fork the repo. 2. Create a branch: `git checkout -b feature/your-feature`. 3. Commit: `git commit -am 'Add feature'`. 4. Push: `git push origin feature/your-feature`. 5. Open a Pull Request. Ideas: more date presets, dark theme, i18n, or improving total-requests detection for future console UI changes. π‘ License π MIT β see [LICENSE](LICENSE). Author π¨βπ» **Vikash Sparxit** GitHub: [@vikashsparxit](https://github.com/vikashsparxit) For bugs or feature requests, open an issue on [GitHub Issues](https://github.com/vikashsparxit/gcp-api-date-picker/issues). π
0 out of 5No ratings
Details
- Version1.0
- UpdatedMarch 17, 2026
- Size264KiB
- LanguagesEnglish
- DeveloperSPARX IT SOLUTIONS PRIVATE LIMITED
First Floor, Plot No-H-21, Sector-63 Gautam Buddha Nagar Noida, Uttar Pradesh 201301 INEmail
vikashshingh@gmail.comPhone
+91 96508 88779 - TraderThis developer has identified itself as a trader per the definition from the European Union and committed to only offer products or services that comply with EU laws.
- D-U-N-S874041274
Privacy
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes
Support
For help with questions, suggestions, or problems, visit the developer's support site