summaryrefslogtreecommitdiff
path: root/doc/api/project_analytics.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 11:59:07 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-17 11:59:07 +0000
commit8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch)
tree544930fb309b30317ae9797a9683768705d664c4 /doc/api/project_analytics.md
parent4b1de649d0168371549608993deac953eb692019 (diff)
downloadgitlab-ce-147fb43c433b88fb402c462b41a5d79eaf331c9c.tar.gz
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'doc/api/project_analytics.md')
-rw-r--r--doc/api/project_analytics.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/api/project_analytics.md b/doc/api/project_analytics.md
new file mode 100644
index 00000000000..97b15cc2c88
--- /dev/null
+++ b/doc/api/project_analytics.md
@@ -0,0 +1,52 @@
+---
+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
+---
+
+# Project Analytics API **(ULTIMATE ONLY)**
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/279039) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.7.
+
+All methods require reporter authorization.
+
+## List project deployment frequencies
+
+Get a list of all project aliases:
+
+```plaintext
+GET /projects/:id/analytics/deployment_frequency?environment=:environment&from=:from&to=:to&interval=:interval
+```
+
+| Attribute | Type | Required | Description |
+|--------------|--------|----------|-----------------------|
+| `id` | string | yes | The ID of the project |
+
+| 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`) |
+
+```shell
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/:id/analytics/deployment_frequency?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
+ }
+]
+```