diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /doc/api/product_analytics.md | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'doc/api/product_analytics.md')
-rw-r--r-- | doc/api/product_analytics.md | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/doc/api/product_analytics.md b/doc/api/product_analytics.md new file mode 100644 index 00000000000..c3114baff8a --- /dev/null +++ b/doc/api/product_analytics.md @@ -0,0 +1,67 @@ +--- +stage: Analyze +group: Product Analytics +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments +--- + +# Product analytics API + +> Introduced in GitLab 15.4 [with a flag](../administration/feature_flags.md) named `cube_api_proxy`. Disabled by default. + +FLAG: +On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, ask an administrator to [enable the feature flag](../administration/feature_flags.md) named `cube_api_proxy`. +On GitLab.com, this feature is not available. +This feature is not ready for production use. + +NOTE: +Make sure to define the `cube_api_base_url` and `cube_api_key` application settings first using [the API](settings.md). + +## Send request to Cube + +Generate an access token that can be used to query the Cube API. For example: + +```plaintext +POST /projects/:id/product_analytics/request +``` + +| Attribute | Type | Required | Description | +| --------- |------------------| -------- |---------------------------------------------------------------| +| `id` | integer | yes | The ID of a project that the current user has read access to. | + +### Request body + +The body of the request should be a valid Cube query. + +```json +{ + "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 + } +} +``` |