Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0b6572d2
Commit
0b6572d2
authored
Jun 17, 2021
by
Vijay Hawoldar
Committed by
Etienne Baqué
Jun 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add internal docs for CI minute provisioning
parent
6480cf16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
doc/development/internal_api.md
doc/development/internal_api.md
+47
-0
No files found.
doc/development/internal_api.md
View file @
0b6572d2
...
...
@@ -650,3 +650,50 @@ 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"
}
```
### Known consumers
-
CustomersDot
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment