9 operations in the WP Waterfall API.
- getList the company's connected Google accounts
- postStart connecting a Google account for a tool
- deleteDisconnect a Google account
- getRead a site's Google Analytics tool
- putTurn Google Analytics on for a site and choose its property
- getRead a site's Google Analytics traffic
- getRead a site's Google Search Console tool
- putTurn Google Search Console on for a site and choose its property
- getRead how a site does in Google search
List the company's connected Google accounts
get/integrations/googlePermalink to List the company's connected Google accounts
- Scope:
sites:read - Permission:
sites.read
One connection at most for each tool (Search Console and Google Analytics). Each shows the Google account that connected, the scopes granted, and whether it works or needs the person to connect again. A token is never in the answer. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleIntegrations | The connections |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
connections required | array of object | At most one connection for each tool. |
connections[].id required | string (uuid) | UUIDv7 |
connections[].tool required | string | One of: search_console, google_analytics. |
connections[].google_email required | string | The Google account that connected, for example name@example.com. |
connections[].scopes required | array of string | The scopes Google granted. |
connections[].status required | string | One of: connected, needs_reconnect. |
connections[].status_reason required | string or null | Why the connection needs the person: access_revoked or access_denied. Null while it works. |
connections[].connected_by required | string or null | The name or email of the person who connected it. |
connections[].connected_at required | string (date-time) | |
connections[].updated_at required | string (date-time) | |
redirect_uri required | string | The address Google sends the person back to. It must be an authorized redirect URI. |
Start connecting a Google account for a tool
post/integrations/google/connectPermalink to Start connecting a Google account for a tool
- Permission:
sites.update - Dashboard session only, no API key
Returns the Google address to send the browser to. Google asks the person to allow read only access, then sends them back to WP Waterfall, which keeps the grant and returns them to the site's Tools tab. The link works once, for 10 minutes, and only in the browser session that asked for it, so this route needs a signed-in session and refuses API keys. Connecting again replaces the account of that tool for the whole company. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key required | header | string | Send a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422. |
Request body application/json, required, ConnectGoogleRequest
Fields
| Name | Type | Description |
|---|---|---|
tool required | string | One of: search_console, google_analytics. |
site_id required | string (uuid) | The site the person is setting up. They come back to its Tools tab. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleAuthorization | The Google address |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
authorization_url required | string (uri) | Send the browser here. Google asks the person to allow read only access. |
expires_at required | string (date-time) |
Disconnect a Google account
delete/integrations/google/{id}Permalink to Disconnect a Google account
- Scope:
sites:write - Permission:
sites.update - Needs a confirmation
Tells Google to end the grant, deletes the stored tokens, and clears the property every site had chosen from this account. The tool stays on for those sites and asks for a new connection. Needs a role that manages every site in the company. Audited.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the Google connection. |
confirm | query | string | An API key must say yes to this change: confirm=true here, or confirm: true in the JSON body. Without it the call answers 422 and changes nothing. One of: true. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleDisconnected | Disconnected |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
id required | string (uuid) | UUIDv7 |
tool required | string | One of: search_console, google_analytics. |
disconnected required | boolean | |
sites_cleared required | integer | Sites that had a property of this account chosen. Their choice is cleared. Range: 0 to any. |
Read a site's Google Analytics tool
get/sites/{id}/google-analyticsPermalink to Read a site's Google Analytics tool
- Scope:
sites:read - Permission:
sites.read
Whether the tool is on, the company's connection, and the Google Analytics 4 property this site reads. With list_properties=true it also lists the properties the connected account can read. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
list_properties | query | string | One of: true, false. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleToolSettings | The tool settings |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
tool required | string | One of: search_console, google_analytics. |
enabled required | boolean | On when the person turned the tool on for this site. Off is the default. |
connection required | object or null | The company's connection for this tool, or null when none is connected. |
connection.id required | string (uuid) | UUIDv7 |
connection.google_email required | string | |
connection.status required | string | One of: connected, needs_reconnect. |
connection.status_reason required | string or null | |
connection.connected_at required | string (date-time) | |
property required | object or null | The property this site reads. Null until one is chosen. |
property.id required | string | |
property.name required | string | |
properties required | array or null | The properties the connected account can read. Present only when the call asks for them with list_properties=true, and only while the connection works. |
properties_limited required | boolean | True when this caller may choose only some of the account's properties: a person limited to some sites (a Site Admin) gets the Search Console properties of this site's proven domains, and the property a person with a company wide role chose for the site. The list holds only those. False for a person with a company wide role, who may choose any. |
properties_error required | string or null | One plain sentence when the property list could not be read. |
Turn Google Analytics on for a site and choose its property
put/sites/{id}/google-analyticsPermalink to Turn Google Analytics on for a site and choose its property
- Scope:
sites:write - Permission:
sites.update
enabled true turns the tool on, and property_id picks the Google Analytics 4 property to read, such as properties/123456789. The property must be one the connected account can read. enabled false turns the tool off and forgets the property. A change is audited and starts no job. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, PutGoogleToolRequest
Fields
| Name | Type | Description |
|---|---|---|
enabled required | boolean | True turns the tool on for the site, false turns it off and forgets the chosen property. |
property_id | string or null | The property to read, as the list gives it. Send null to clear the choice. Leave it out to keep the one the site has. A person limited to some sites may send only a property the list gave them (properties_limited); any other answers 403 google_property_not_allowed. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleToolSettings | The tool settings |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
tool required | string | One of: search_console, google_analytics. |
enabled required | boolean | On when the person turned the tool on for this site. Off is the default. |
connection required | object or null | The company's connection for this tool, or null when none is connected. |
connection.id required | string (uuid) | UUIDv7 |
connection.google_email required | string | |
connection.status required | string | One of: connected, needs_reconnect. |
connection.status_reason required | string or null | |
connection.connected_at required | string (date-time) | |
property required | object or null | The property this site reads. Null until one is chosen. |
property.id required | string | |
property.name required | string | |
properties required | array or null | The properties the connected account can read. Present only when the call asks for them with list_properties=true, and only while the connection works. |
properties_limited required | boolean | True when this caller may choose only some of the account's properties: a person limited to some sites (a Site Admin) gets the Search Console properties of this site's proven domains, and the property a person with a company wide role chose for the site. The list holds only those. False for a person with a company wide role, who may choose any. |
properties_error required | string or null | One plain sentence when the property list could not be read. |
Read a site's Google Analytics traffic
get/sites/{id}/google-analytics/reportPermalink to Read a site's Google Analytics traffic
- Scope:
sites:read - Permission:
sites.read
kind overview gives users, sessions, page views, and engagement rate for the range, with one entry for each day. pages gives the top 25 pages by views, and sources the top 25 sources by sessions. The range is the last 28 days unless from and to are given, and it is at most 400 days. Answers are kept 15 minutes. Answers 409 with code google_reconnect_needed when the Google access ended, and 503 with code google_unavailable when Google is busy. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
from | query | string | First day, inclusive. Default: 28 days before to. |
to | query | string | Last day, inclusive. Default: today. |
kind | query | string | One of: overview, pages, sources. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleAnalyticsReport | The report |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
property required | string | |
kind required | string | One of: overview, pages, sources. |
from required | string | |
to required | string | |
totals required | object or null | |
totals.users required | number | |
totals.sessions required | number | |
totals.views required | number | |
totals.engagement_rate required | number | |
series required | array of object | |
series[].date required | string | |
series[].users required | number | |
series[].sessions required | number | |
series[].views required | number | |
series[].engagement_rate required | number | |
rows required | array of object | The pages kind has page paths as keys, the sources kind has source and medium. |
rows[].key required | string | |
rows[].users required | number | |
rows[].sessions required | number | |
rows[].views required | number | |
rows[].engagement_rate required | number | |
cached required | boolean | |
fetched_at required | string (date-time) |
Read a site's Google Search Console tool
get/sites/{id}/search-consolePermalink to Read a site's Google Search Console tool
- Scope:
sites:read - Permission:
sites.read
Whether the tool is on, the company's connection, and the property this site reads. With list_properties=true it also lists the properties the connected account can read. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
list_properties | query | string | One of: true, false. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleToolSettings | The tool settings |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
tool required | string | One of: search_console, google_analytics. |
enabled required | boolean | On when the person turned the tool on for this site. Off is the default. |
connection required | object or null | The company's connection for this tool, or null when none is connected. |
connection.id required | string (uuid) | UUIDv7 |
connection.google_email required | string | |
connection.status required | string | One of: connected, needs_reconnect. |
connection.status_reason required | string or null | |
connection.connected_at required | string (date-time) | |
property required | object or null | The property this site reads. Null until one is chosen. |
property.id required | string | |
property.name required | string | |
properties required | array or null | The properties the connected account can read. Present only when the call asks for them with list_properties=true, and only while the connection works. |
properties_limited required | boolean | True when this caller may choose only some of the account's properties: a person limited to some sites (a Site Admin) gets the Search Console properties of this site's proven domains, and the property a person with a company wide role chose for the site. The list holds only those. False for a person with a company wide role, who may choose any. |
properties_error required | string or null | One plain sentence when the property list could not be read. |
Turn Google Search Console on for a site and choose its property
put/sites/{id}/search-consolePermalink to Turn Google Search Console on for a site and choose its property
- Scope:
sites:write - Permission:
sites.update
enabled true turns the tool on, and property_id picks the property to read (a URL prefix such as https://example.com/ or a domain property such as sc-domain:example.com). The property must be one the connected account can read. enabled false turns the tool off and forgets the property. A change is audited and starts no job. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
Idempotency-Key | header | string | Optional on PUT and PATCH. When the call starts a job, a retry with the same key, path, and body within 24 hours returns that job instead of starting another. A different path or body starts a new job. |
Request body application/json, required, PutGoogleToolRequest
Fields
| Name | Type | Description |
|---|---|---|
enabled required | boolean | True turns the tool on for the site, false turns it off and forgets the chosen property. |
property_id | string or null | The property to read, as the list gives it. Send null to clear the choice. Leave it out to keep the one the site has. A person limited to some sites may send only a property the list gave them (properties_limited); any other answers 403 google_property_not_allowed. |
Responses
| Status | Body | Description |
|---|---|---|
200 | GoogleToolSettings | The tool settings |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
409 | Problem | The current state does not allow this: the same change is already running, or another change got there first. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
tool required | string | One of: search_console, google_analytics. |
enabled required | boolean | On when the person turned the tool on for this site. Off is the default. |
connection required | object or null | The company's connection for this tool, or null when none is connected. |
connection.id required | string (uuid) | UUIDv7 |
connection.google_email required | string | |
connection.status required | string | One of: connected, needs_reconnect. |
connection.status_reason required | string or null | |
connection.connected_at required | string (date-time) | |
property required | object or null | The property this site reads. Null until one is chosen. |
property.id required | string | |
property.name required | string | |
properties required | array or null | The properties the connected account can read. Present only when the call asks for them with list_properties=true, and only while the connection works. |
properties_limited required | boolean | True when this caller may choose only some of the account's properties: a person limited to some sites (a Site Admin) gets the Search Console properties of this site's proven domains, and the property a person with a company wide role chose for the site. The list holds only those. False for a person with a company wide role, who may choose any. |
properties_error required | string or null | One plain sentence when the property list could not be read. |
Read how a site does in Google search
get/sites/{id}/search-console/reportPermalink to Read how a site does in Google search
- Scope:
sites:read - Permission:
sites.read
kind overview gives clicks, impressions, click through rate, and average position for the range, with one entry for each day. queries, pages, countries, and devices give the top 25 rows by clicks. The range is the last 28 days unless from and to are given, and it is at most 400 days. Search Console reports a few days late, so the newest days can be empty. Answers are kept 15 minutes. Answers 409 with code google_reconnect_needed when the Google access ended, and 503 with code google_unavailable when Google is busy. Answers 503 with code provider_not_configured while this WP Waterfall install has no Google client id and secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string (uuid) | The id of the site. |
from | query | string | First day, inclusive. Default: 28 days before to. |
to | query | string | Last day, inclusive. Default: today. |
kind | query | string | One of: overview, queries, pages, countries, devices. |
Responses
| Status | Body | Description |
|---|---|---|
200 | SearchConsoleReport | The report |
400 | Problem | The request could not be read: bad JSON, a bad header, or a malformed value. |
401 | Problem | The credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme. |
403 | Problem | The credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing. |
404 | Problem | The thing in the path does not exist, or it belongs to another company. The answer is the same for both. |
422 | Problem | The request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field. |
429 | Problem | A rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address. |
4XX | Problem | Problem Details (RFC 9457) |
200 response fields
| Name | Type | Description |
|---|---|---|
site_id required | string (uuid) | UUIDv7 |
property required | string | |
kind required | string | One of: overview, queries, pages, countries, devices. |
from required | string | |
to required | string | |
totals required | object or null | Overview only: the totals of the range. Null for the other kinds. |
totals.clicks required | number | |
totals.impressions required | number | |
totals.ctr required | number | |
totals.position required | number | |
series required | array of object | Overview only: one entry for each day with data. |
series[].date required | string | |
series[].clicks required | number | |
series[].impressions required | number | |
series[].ctr required | number | |
series[].position required | number | |
rows required | array of object | The other kinds: the top 25 rows by clicks. |
rows[].key required | string | |
rows[].clicks required | number | |
rows[].impressions required | number | |
rows[].ctr required | number | |
rows[].position required | number | |
cached required | boolean | True when this answer came from the 15 minute memory and not from Google. |
fetched_at required | string (date-time) |