Repository navigation
Add a Google Search Console template generated from Google's API description - #473
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 5f2dac9 | Nov 29 2026, 08:48 AM |
tnkuehne
force-pushed
the
google-search-console-template
branch
from
November 29, 2026 08:33
26550bf to
9e6da82
Compare
…ription All ten methods of the Search Console API as typed methods: search analytics, URL inspection, properties and sitemaps. Adding a property runs at once by default; submitting sitemaps and removing properties and sitemaps ask first. The retired Mobile-Friendly Test is not offered.
Google's description lists the enum values of the properties, sitemaps and search analytics methods in capitals, such as SITE_OWNER and QUERY. The API sends and takes the values its reference lists, such as siteOwner, query and hourly_all, so the rules map each field's values to those. URL inspection does use capitals and keeps them. Google returns the description's methods in a different order on each download, which reorders the generated files.
tnkuehne
force-pushed
the
google-search-console-template
branch
from
November 29, 2026 08:47
9e6da82 to
5f2dac9
Compare
…ate limits Filter lists match several values of only a country or device, so their dimension takes only those. Search Console reports daily quotas, such as URL inspections per property, as 403 dailyLimitExceeded, which now returns rate_limited like its other quota errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Search performance and index status are a common input for internal apps and agents, and no template covers Google Search Console yet. Like Sheets and Calendar, it only needs rules on top of the discovery generator.
What changes
Google Search Console template (
templates/google-search-console)searchanalyticsQuery,urlInspectionIndexInspect,sitesList/sitesGet/sitesAdd/sitesDeleteandsitemapsList/sitemapsGet/sitemapsSubmit/sitemapsDelete.urlTestingTools.mobileFriendlyTest.run. Google retired the Mobile-Friendly Test API in December 2023; the method is still in the description but returns no results.https://www.googleapis.com/auth/webmasters, which adding and removing need and every other method accepts. An account connected withwebmasters.readonlygetspermission_required.siteUrlandfeedpathare passed as Search Console lists them (sc-domain:example.com,https://example.com/) and sent as one encoded path segment each.search_console_errorcarries Google's message, status and reasons. Rate limits including daily quotas (dailyLimitExceeded), missing scopes, revoked tokens and responses over 8 MiB are handled like in the other Google templates.SITE_OWNER,QUERY,BY_PROPERTY). The API sends the values its reference lists (siteOwner,query,byProperty,hourly_all), so the rules map them withenumValuesfrom Let Discovery rules give the enum values an API really uses #485. URL inspection does use capitals and keeps them. Values the reference leaves out, such as the sitemap typeOCEANFRONT, follow the other values' spelling.filterListstakes onlycountryanddevice, the dimensions Google supports for it.Not run live
sitemapsSubmitandsitemapsDelete. They use the same path encoding and empty-response handling assitesAddandsitesDelete, which ran live, and are covered by the template tests.Live run
Run against a real Google account through a deployed copy of the template:
sitesList,sitesGet,sitemapsList: Google returnssiteOwner,siteFullUser, sitemap typesitemapand content typeweb, the mapped values.searchanalyticsQuerywithquery/devicedimensions,notContainsfilter with non-ASCII text,filterListsby country,type: "web",aggregationType: "byProperty",dataState: "all"; and grouped byhourwithhourly_all. Google returnsresponseAggregationType: "byProperty"andmetadata.firstIncompleteHour, as the description names it. Requests with the description's capitals (QUERY,BY_PROPERTY) are accepted too; responses always use the mapped values.urlInspectionIndexInspect: returnsPASS,ALLOWED,INDEXING_ALLOWED,SUCCESSFUL,MOBILEin capitals, as the description lists them.sitesAddandsitesDeletewith a non-ASCII property URL (https://live-test-größe.widefleet.com/): both return no data; Google stores the property under its punycode host and removes it again.sitemapsSubmitasks first at the default level; declining returnsdeclined.Tests
src/api.tsandsrc/schema.tswithout changing their content.permissionLevel === "siteOwner"compiles;"SITE_OWNER",dimensions: ["QUERY"]and aqueryfilter list don't.