Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-17 18:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-17 18:10:03 +0300
commit5c5e86aa5c6e8be8424a92846cd0dfa8e72944e2 (patch)
tree9047b132263f282626359e89c8656b48019a58ca /doc/development/internal_api.md
parent11cb5f046dddc630abd416593e176d65f6ba2b69 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/internal_api.md')
-rw-r--r--doc/development/internal_api.md86
1 files changed, 86 insertions, 0 deletions
diff --git a/doc/development/internal_api.md b/doc/development/internal_api.md
index 95139f731e1..481f603b931 100644
--- a/doc/development/internal_api.md
+++ b/doc/development/internal_api.md
@@ -650,3 +650,89 @@ Example response:
### Known consumers
- CustomersDot
+
+## CI minute provisioning
+
+The CI Minute endpoint is used by [CustomersDot](https://gitlab.com/gitlab-org/customers-gitlab-com) (`customers.gitlab.com`)
+to apply additional packs of CI minutes, for personal namespaces or top-level groups within GitLab.com.
+
+### Creating an additional pack
+
+Use a POST to create an additional pack.
+
+```plaintext
+POST /namespaces/:id/minutes
+```
+
+| Attribute | Type | Required | Description |
+|:------------|:--------|:---------|:------------|
+| `expires_at` | date | yes | Expiry date of the purchased pack|
+| `number_of_minutes` | integer | yes | Number of additional minutes |
+| `purchase_xid` | string | yes | The unique ID of the purchase |
+
+Example request:
+
+```shell
+curl --request POST \
+ --url http://localhost:3000/api/v4/namespaces/123/minutes \
+ --header 'Content-Type: application/json' \
+ --header 'PRIVATE-TOKEN: <admin access token>' \
+ --data '{
+ "number_of_minutes": 10000,
+ "expires_at": "2022-01-01",
+ "purchase_xid": "46952fe69bebc1a4de10b2b4ff439d0c" }'
+```
+
+Example response:
+
+```json
+{
+ "namespace_id": 123,
+ "expires_at": "2022-01-01",
+ "number_of_minutes": 10000,
+ "purchase_xid": "46952fe69bebc1a4de10b2b4ff439d0c"
+}
+```
+
+## Upcoming reconciliations
+
+The `upcoming_reconciliations` endpoint is used by [CustomersDot](https://gitlab.com/gitlab-org/customers-gitlab-com) (`customers.gitlab.com`)
+to update upcoming reconciliations for namespaces.
+
+### Updating `upcoming_reconciliations`
+
+Use a PUT command to update `upcoming_reconciliations`.
+
+```plaintext
+PUT /internal/upcoming_reconciliations
+```
+
+| Attribute | Type | Required | Description |
+|:-------------------|:-----------|:---------|:------------|
+| `upcoming_reconciliations` | array | yes | Array of upcoming reconciliations |
+
+Each array element contains:
+
+| Attribute | Type | Required | Description |
+|:-------------------|:-----------|:---------|:------------|
+| `namespace_id` | integer | yes | ID of the namespace to be reconciled |
+| `next_reconciliation_date` | date | yes | Date when next reconciliation will happen |
+| `display_alert_from` | date | yes | Start date to display alert of upcoming reconciliation |
+
+Example request:
+
+```shell
+curl --request PUT --header "PRIVATE-TOKEN: <admin_access_token>" --header "Content-Type: application/json" \
+ --data '{"upcoming_reconciliations": [{"namespace_id": 127, "next_reconciliation_date": "13 Jun 2021", "display_alert_from": "06 Jun 2021"}, {"namespace_id": 129, "next_reconciliation_date": "12 Jun 2021", "display_alert_from": "05 Jun 2021"}]}' \
+ "https://gitlab.com/api/v4/internal/upcoming_reconciliations"
+```
+
+Example response:
+
+```plaintext
+200
+```
+
+### Known consumers
+
+- CustomersDot