Extended Analytics Cube Proxy for dry-run and meta calls
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
- Enable the feature flag:
echo "Feature.enable(:cube_api_proxy)" | rails c
. - Set up the devkit and start it running using
docker-compose up
. - 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
. - 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"
}
- Expect it to respond with a
201
POST /api/v4/projects/{PROJECT_ID}/product_analytics/request/meta
Content-Type: application/json
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tim Zallmann