debian-mirror-gitlab/doc/api/product_analytics.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.8 KiB
Markdown
Raw Normal View History

2022-10-11 01:57:18 +05:30
---
stage: Analyze
group: Product Analytics
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2022-10-11 01:57:18 +05:30
---
# 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
2022-11-25 23:54:43 +05:30
POST /projects/:id/product_analytics/request/load
2022-10-11 01:57:18 +05:30
```
| 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
2022-11-25 23:54:43 +05:30
},
"queryType": "multi"
2022-10-11 01:57:18 +05:30
}
```