Commit f145acd2 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'vij-update-ci-minute-pack-docs' into 'master'

Update internal API docs

See merge request gitlab-org/gitlab!67606
parents 95ba6db7 282eaa34
...@@ -658,7 +658,7 @@ to apply additional packs of CI minutes, for personal namespaces or top-level gr ...@@ -658,7 +658,7 @@ to apply additional packs of CI minutes, for personal namespaces or top-level gr
### Creating an additional pack ### Creating an additional pack
Use a POST to create an additional pack. Use a POST to create additional packs.
```plaintext ```plaintext
POST /namespaces/:id/minutes POST /namespaces/:id/minutes
...@@ -666,9 +666,10 @@ POST /namespaces/:id/minutes ...@@ -666,9 +666,10 @@ POST /namespaces/:id/minutes
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|:------------|:--------|:---------|:------------| |:------------|:--------|:---------|:------------|
| `expires_at` | date | yes | Expiry date of the purchased pack| | `packs` | array | yes | An array of purchased minutes packs |
| `number_of_minutes` | integer | yes | Number of additional minutes | | `packs[expires_at]` | date | yes | Expiry date of the purchased pack|
| `purchase_xid` | string | yes | The unique ID of the purchase | | `packs[number_of_minutes]` | integer | yes | Number of additional minutes |
| `packs[purchase_xid]` | string | yes | The unique ID of the purchase |
Example request: Example request:
...@@ -678,20 +679,27 @@ curl --request POST \ ...@@ -678,20 +679,27 @@ curl --request POST \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'PRIVATE-TOKEN: <admin access token>' \ --header 'PRIVATE-TOKEN: <admin access token>' \
--data '{ --data '{
"packs": [
{
"number_of_minutes": 10000, "number_of_minutes": 10000,
"expires_at": "2022-01-01", "expires_at": "2022-01-01",
"purchase_xid": "46952fe69bebc1a4de10b2b4ff439d0c" }' "purchase_xid": "46952fe69bebc1a4de10b2b4ff439d0c"
}
]
}'
``` ```
Example response: Example response:
```json ```json
{ [
{
"namespace_id": 123, "namespace_id": 123,
"expires_at": "2022-01-01", "expires_at": "2022-01-01",
"number_of_minutes": 10000, "number_of_minutes": 10000,
"purchase_xid": "46952fe69bebc1a4de10b2b4ff439d0c" "purchase_xid": "46952fe69bebc1a4de10b2b4ff439d0c"
} }
]
``` ```
### Moving additional packs ### Moving additional packs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment