Delete an exclusion
Removes a rule or an excluded address. Discovery may find its pages again from the next sitemap import or traffic run; nothing is restored at once. Recorded in the audit log, attributed to the API key. Returns the id and a deleted flag.
Authorization
ApiKeyAuth A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).
In: header
Path Parameters
The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.
The exclusion id (prefixed spgx_).
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X DELETE "https://example.com/api/v1/sites/string/pages/exclusions/string"{ "data": { "id": "spgx_01kvnwmagvf27rc9cze5rm9e1r", "deleted": true }}Add exclusion rules
Adds path rules, at most 50 per site. Each rule removes at once every page of source `sitemap` or `tag` whose path it matches (their starter questions stay) and keeps later imports and traffic from adding such pages again. Pages added by hand are never removed. A rule the site already holds is reported in `alreadyExcluded`. A malformed rule refuses the whole request with `invalid_exclusion_rule`, and going past 50 rules with `exclusion_rule_limit_reached`; nothing is changed then. Recorded in the audit log with counts only, attributed to the API key.
List a site's most viewed pages over the last 30 days
Returns the pages of the site with a view in the last 30 UTC days, most viewed first, at most 50. These are the figures of the Page views tab of the Engagement report and of the Views column of the Pages list. Pages with no view in the window are left out, and there is no paging, cursor or filter. The figures are computed once a day, so `meta.computedAt` says when they were last computed (`null` before the first computation). `meta.countingOn` is `false` while page-view counting is off for the site: `data` is then empty, and that is not the same as no page being viewed. Switch counting on under Settings, Site access.