diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /doc/api/dora4_group_analytics.md | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) | |
download | gitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'doc/api/dora4_group_analytics.md')
-rw-r--r-- | doc/api/dora4_group_analytics.md | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/doc/api/dora4_group_analytics.md b/doc/api/dora4_group_analytics.md new file mode 100644 index 00000000000..7a7260f40e8 --- /dev/null +++ b/doc/api/dora4_group_analytics.md @@ -0,0 +1,84 @@ +--- +stage: Release +group: Release +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 +type: reference, api +--- + +# DORA4 Analytics Group API **(ULTIMATE ONLY)** + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/291747) in GitLab 13.9. +> - It's [deployed behind a feature flag](../user/feature_flags.md), disabled by default. +> - It's disabled on GitLab.com. +> - It's not recommended for production use. +> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-dora4-analytics-group-api). **(ULTIMATE ONLY)** + +WARNING: +This feature might not be available to you. Check the **version history** note above for details. + +All methods require reporter authorization. + +## List group deployment frequencies + +Get a list of all group deployment frequencies: + +```plaintext +GET /groups/:id/analytics/deployment_frequency?environment=:environment&from=:from&to=:to&interval=:interval +``` + +Attributes: + +| Attribute | Type | Required | Description | +|--------------|--------|----------|-----------------------| +| `id` | string | yes | The ID of the group. | + +Parameters: + +| Parameter | Type | Required | Description | +|--------------|--------|----------|-----------------------| +| `environment`| string | yes | The name of the environment to filter by. | +| `from` | string | yes | Datetime range to start from. Inclusive, ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). | +| `to` | string | no | Datetime range to end at. Exclusive, ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). | +| `interval` | string | no | The bucketing interval (`all`, `monthly`, `daily`). | + +Example request: + +```shell +curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/analytics/deployment_frequency?environment=:environment&from=:from&to=:to&interval=:interval" +``` + +Example response: + +```json +[ + { + "from": "2017-01-01", + "to": "2017-01-02", + "value": 106 + }, + { + "from": "2017-01-02", + "to": "2017-01-03", + "value": 55 + } +] +``` + +## Enable or disable DORA4 Analytics Group API **(ULTIMATE ONLY)** + +DORA4 Analytics Group API is under development and not ready for production use. It is +deployed behind a feature flag that is **disabled by default**. +[GitLab administrators with access to the GitLab Rails console](../administration/feature_flags.md) +can enable it. + +To enable it: + +```ruby +Feature.enable(:dora4_group_deployment_frequency_api) +``` + +To disable it: + +```ruby +Feature.disable(:dora4_group_deployment_frequency_api) +``` |