core icon indicating copy to clipboard operation
core copied to clipboard

We have inconsistency between the 2 Endpoint to retrieve CA data

Open freddyDOTCMS opened this issue 4 months ago • 0 comments

Parent Issue

No response

Problem Statement

Right now we have 2 Endpoint to retrive the CA data:

'/v1/analytics/content/_query': support dotCMS query syntax '/v1/analytics/content/_query/cube': support raw CubeJS syntax

Both are POSt and receive the query in the body, but :

The first one receive the query wrap like this:


{
    "query": {
        "filters": "request.urlMapContentTypeName = ['Blog']",
        "dimensions": ["request.urlMapContentDetailId", "request.urlMapContentDetailTitle"],
        "orders": "request.totalSessions desc",
        "measures": ["request.totalSessions"]
    }
}

The second one just receive the query, I mean like this:


{
  "filters": [
    {
      "member": "request.urlMapContentTypeName",
      "operator": "equals",
      "values": [
        "Blog"
      ]
    }
  ],
  "dimensions": [
    "request.urlMapContentDetailId",
    "request.urlMapContentDetailTitle"
  ],
  "order": {
    "request.totalSessions": "desc"
  },
  "measures": [
    "request.totalSessions"
  ]
}

remenber the second Endpoint receive a raw query

Steps to Reproduce

Try to use the 2 Endpoint using Postman

Acceptance Criteria

The Input for the 2 Endpoint must have the same format

dotCMS Version

latest

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

freddyDOTCMS avatar Oct 18 '24 21:10 freddyDOTCMS