Skip to content

Sunset un-paginated GET /sites: migrate remaining legacy-shape consumers #2591

Description

@rainer-friederich

Background

GET /sites recently gained optional pagination (limit/cursor) via PR #2497 (commit ac0dab47, SITES-41367). When called without limit/cursor, the endpoint still returns the legacy flat array (full fetchAllPages scan) for backwards compatibility, and emits a [sites][legacy-shape] log line recording the caller's clientId.

We want to sunset the un-paginated path. This issue tracks the remaining consumers that still call GET /sites without pagination params so we can migrate them before removing the legacy shape.

Method

Coralogix, prod (spacecat-services-prod, account aws-640168421876, function /spacecat-services/api-service/latest), aggregating the [sites][legacy-shape] marker by clientId.

  • Window: 2026-06-08 → 2026-06-11 (last 3 days)
  • The legacy-shape log line carries only clientId — no User-Agent, headers, or source IP (all null).
  • S2S clientId values resolved to consumer names via the prod consumers Postgres table (idx_consumers_client_id).

Findings — consumers of the un-paginated GET /sites (last 3 days)

Named S2S consumers (migration targets)

Calls Consumer name clientId Notes
169 s2s-llmo-data-retrieval-service 6a342b9f35a84f4ab60e4f7f82dfeda0 DRS — BP monitor, site-name maps, schedulers
71 AMS Sites Optimizer ESE Validator Script and Bot a3c925e9aaeb43e7b96c9f7b5c1d7f3c Registered 2026-06-03
34 S2S LLMO Usage Report Generator 500bb9199427463f9c7f6dd022d2248b LLMO usage/MAU reporting
8 S2S AEM-Trustcenter 2f61fa914f324902b9b5bc0c96bfcb4f AEM Trustcenter integration
1 AEM Engineering Operations DaaS ETL 1980219afe204b13b84116f118bcd33f Registered 2026-06-10 — already on legacy shape

All five are ACTIVE, under IMS org 908936ED5D35CC220A495CD4@AdobeOrg, and hold site:readAll.

Admin path — admin-bypass (4,539 calls)

The vast majority of un-paginated calls came through the shared admin credential (admin x-api-key / admin IMS JWT). These all log clientId=admin-bypass, and because the legacy-shape log line carries no user-agent/source, they cannot be attributed to a specific consumer from these logs alone. This bucket is internal tooling / UI / scripts / monitors sharing the admin key.

Open items

  • Attribute the admin-bypass bucket. It is ~95% of legacy-shape volume and is currently opaque. Break it down via API Gateway access logs (they carry User-Agent + source IP keyed by the same requestId). Consider also enriching the [sites][legacy-shape] log line with User-Agent so future attribution is possible directly.
  • Migrate the 5 named S2S consumers to pass ?limit=&cursor= (paginated envelope):
    • s2s-llmo-data-retrieval-service (DRS)
    • AMS Sites Optimizer ESE Validator Script and Bot
    • S2S LLMO Usage Report Generator
    • S2S AEM-Trustcenter
    • AEM Engineering Operations DaaS ETL
  • Flag to the DaaS ETL owners that their newly registered consumer (2026-06-10) is already integrating against the legacy shape — fix before sunset.
  • Run the same breakdown for stage/dev before removal.
  • Define the deprecation/sunset timeline and remove the legacy flat-array path once consumers are migrated.

Notes

  • This analysis is prod only.
  • The legacy path performs a full fetchAllPages scan (filtering internal orgs to stay under the 6MB Lambda limit), which is the cost motivating the sunset.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions