Skip to content

API for exposing top pages metrics for a specific site #461

Open
@iuliag

Description

Is your feature request related to a problem? Please describe.
Implement API for exposing top pages metrics for a specific site

Describe the solution you'd like
API endpoint for exposing top pages metrics for a specific site.
Be able to get:

  • all of them
  • for a specific source only
  • for a specific source and geo only

API spec proposed in #292, https://opensource.adobe.com/spacecat-api-service/#tag/top-pages/operation/getSiteTopPages

Or we can align with the site metrics by source API https://opensource.adobe.com/spacecat-api-service/#tag/experimental/operation/getSiteMetricsBySource and have something along the lines of:

GET /sites/{siteId}/top-pages/metrics/{metric}/{source}
GET /sites/{siteId}/top-pages/metrics/organic-traffic
GET /sites/{siteId}/top-pages/metrics/organic-traffic/ahrefs
GET /sites/{siteId}/top-pages/metrics/organic-traffic/ahrefs/au

[
  {
    "siteId": "a1b2c3d4-e5f6-7g8h-9i0j-k11l12m13n14",
    "source": "ahrefs",
    "name": "organic-traffic",
    "value": 37900,
    "time": "2024-04-29T00:00:00.000Z"
    "geo": "au",
    "url": "https://example-site.com/foo/bar"
  }
]

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions