Skip to content
Navigation

Get analytics comparison

GET
https://api.sureshake.com/v2/reports/analytics/comparison

Query parameters

  • period
    optional
    day
    or
    week
    or
    month
    default: "month"
  • limit
    optional
    integer
    maximum: 50 · minimum: 1 · default: 20
  • cursor
    optional
    string
    maxLength: 2048 · minLength: 42 · pattern: ^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$
  • sortBy
    optional
    total_views
    or
    unique_viewers
    or
    anonymous_views
    or
    title
    default: "total_views"
  • sortDirection
    optional
    asc
    or
    desc
    default: "desc"
  • query
    optional
    string
    maxLength: 100 · minLength: 1

Returns

200

Default Response

JSON
  • data
    object
    required
    • status
      available
      required
    • readAt
      string
      required
      format: date-time
    • scope
      object
      required
      • ownerUserId
        string
        required
        maxLength: 256 · minLength: 1
      • authorization
        report_owner_only
        required
      • period
        object
        required
        • key
          day
          or
          week
          or
          month
          or
          custom
          required
        • startAt
          string
          required
          format: date-time
        • endAt
          string
          required
          format: date-time
        • timezone
          UTC
          required
        • interval
          half_open
          required
        • asOf
          string
          required
          format: date-time
        • coverage
          event_window
          or
          snapshot
          or
          projection
          required
        • comparison
          object
          required
          • startAt
            string
            required
            format: date-time
          • endAt
            string
            required
            format: date-time
          • relationship
            immediately_preceding_equal_duration
            required
      • source
        required

        Any of the following:

        • object
          • key
            directory_listing_views
            required
          • classification
            canonical
            required
          • recordAuthorities
            array of
            unknown
            required
          • readAuthorities
            array of
            unknown
            required
          • projectionAuthority
            object
            required
            • ordering
              events.stream_version
              required
            • receipts
              projection_event_receipts
              required
            • checkpoint
              projection_scoped_checkpoints
              required
            • lifecycle
              projection_lifecycles
              required
          • countingPolicy
            eligible_event
            required
          • countingEnforcement
            partial
            required
          • viewerHistory
            object
            required
            • availability
              unavailable
              required
            • timeAuthority
              first_viewed_at_only
              required
            • blocker
              last_view_watermark_required
              required
          • policyVersion
            directory-engagement-v1
            required
        • object
          • key
            compatibility_profile_views
            required
          • classification
            compatibility
            required
          • recordAuthority
            profile_views
            required
          • readAuthorities
            array of
            unknown
            required
          • countingPolicy
            deduplicated_24_hours
            required
          • countingEnforcement
            enforced
            required
          • viewerHistory
            object
            required
            • availability
              available
              required
            • timeAuthority
              latest_viewed_at
              required
          • policyVersion
            profile-views-v1
            required
        • object
          • key
            compatibility_entity_views
            required
          • classification
            compatibility
            required
          • recordAuthority
            entity_views
            required
          • readAuthorities
            array of
            unknown
            required
          • countingPolicy
            compatibility_source_owned
            required
          • countingEnforcement
            partial
            required
          • viewerHistory
            object
            required
            • availability
              available
              required
            • timeAuthority
              latest_viewed_at
              required
          • policyVersion
            entity-views-v1
            required
        • object
          • key
            report_views
            required
          • classification
            canonical
            required
          • recordAuthority
            document_views
            required
          • readAuthorities
            array of
            unknown
            required
          • countingPolicy
            idempotent_document_view
            required
          • countingEnforcement
            enforced
            required
          • viewerHistory
            object
            required
            • availability
              available
              required
            • timeAuthority
              latest_viewed_at
              required
            • attributionAuthority
              report_view_delivery_receipts.private_attribution
              required
          • idempotencyEnforcement
            object
            required
            • share
              enforced
              required
            • direct
              enforced
              required
            • vaultOrCollection
              enforced
              required
            • api
              enforced
              required
          • policyVersion
            report-views-v1
            required
    • rows
      array of
      object
      required
      • report
        object
        required
        • id
          string
          required
          format: uuid
        • title
          string
          required
      • totalViews
        integer
        required
        minimum: 0
      • uniqueViewers
        integer
        required
        minimum: 0
      • anonymousViews
        integer
        required
        minimum: 0
      • viewsBySource
        object
        required
        • share
          integer
          required
          minimum: 0
        • vault
          integer
          required
          minimum: 0
        • direct
          integer
          required
          minimum: 0
        • api
          integer
          required
          minimum: 0
        • unknown
          integer
          required
          minimum: 0
    • pagination
      object
      required
      • limit
        integer
        required
        maximum: 50 · minimum: 1
      • hasMore
        boolean
        required
      • nextCursor
        string
        or null
        required
        maxLength: 2048 · minLength: 42 · pattern: ^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$
  • meta
    optional
    object
    • timestamp
      string
      required
      format: date-time

400

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

401

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

403

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

404

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

500

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

Type to search…

↑↓ navigate↵ selectEsc close