Skip to content

Extended Analytics Cube Proxy for dry-run and meta calls

Tim Zallmann requested to merge tz-extend-cube-proxy-calls into master

What does this MR do and why?

Extends our Product Analytics Proxy for dry-run and meta calls.

How to set up and validate locally

Make sure you are on at least GitLab Premium.

Testing this MR specifically
  1. Enable the feature flag: echo "Feature.enable(:cube_api_proxy)" | rails c.
  2. Set up the devkit and start it running using docker-compose up.
  3. Update application settings: echo "ApplicationSetting.current.update(cube_api_base_url: 'http://gdk.test:4000', cube_api_key: API KEY FROM CUBE .env)" | rails c.
  4. As an authenticated user who has developer+ access to a particular project, make the following API call:
POST /api/v4/projects/{PROJECT_ID}/product_analytics/request/dry-run

Content-Type: application/json

Send it with a valid cube query as a JSON body:

{
  "query": {
    "measures": [
      "Jitsu.count"
    ],
    "timeDimensions": [
      {
        "dimension": "Jitsu.utcTime",
        "dateRange": "This week"
      }
    ],
    "order": [
      [
        "Jitsu.count",
        "desc"
      ],
      [
        "Jitsu.docPath",
        "desc"
      ],
      [
        "Jitsu.utcTime",
        "asc"
      ]
    ],
    "dimensions": [
      "Jitsu.docPath"
    ],
    "limit": 23
  },
  "queryType": "multi"
}
  1. Expect it to respond with a 201
POST /api/v4/projects/{PROJECT_ID}/product_analytics/request/meta

Content-Type: application/json
  1. Expect it to respond with a 201

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tim Zallmann

Merge request reports