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

plan_limits.md « api « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 75c8d241513d6a6c9a4afc37c251b0ca23a70bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
stage: Manage
group: Authentication and Authorization
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
---

# Plan limits API **(FREE SELF)**

> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54232) in GitLab 13.10.

The plan limits API allows you to maintain the application limits for the existing subscription plans.

The existing plans depend on the GitLab edition. In the Community Edition, only the plan `default`
is available. In the Enterprise Edition, additional plans are available as well.

Administrator access is required to use this API.

## Get current plan limits

List the current limits of a plan on the GitLab instance.

```plaintext
GET /application/plan_limits
```

| Attribute                         | Type    | Required | Description |
| --------------------------------- | ------- | -------- | ----------- |
| `plan_name`                       | string  | no       | Name of the plan to get the limits from. Default: `default`. |

```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/plan_limits"
```

Example response:

```json
{
  "conan_max_file_size": 3221225472,
  "generic_packages_max_file_size": 5368709120,
  "helm_max_file_size": 5242880,
  "maven_max_file_size": 3221225472,
  "npm_max_file_size": 524288000,
  "nuget_max_file_size": 524288000,
  "pypi_max_file_size": 3221225472,
  "terraform_module_max_file_size": 1073741824
}
```

## Change plan limits

Modify the limits of a plan on the GitLab instance.

```plaintext
PUT /application/plan_limits
```

| Attribute                         | Type    | Required | Description |
| --------------------------------- | ------- | -------- | ----------- |
| `plan_name`                       | string  | yes      | Name of the plan to update. |
| `conan_max_file_size`             | integer | no       | Maximum Conan package file size in bytes. |
| `generic_packages_max_file_size`  | integer | no       | Maximum generic package file size in bytes. |
| `helm_max_file_size`              | integer | no       | Maximum Helm chart file size in bytes. |
| `maven_max_file_size`             | integer | no       | Maximum Maven package file size in bytes. |
| `npm_max_file_size`               | integer | no       | Maximum NPM package file size in bytes. |
| `nuget_max_file_size`             | integer | no       | Maximum NuGet package file size in bytes. |
| `pypi_max_file_size`              | integer | no       | Maximum PyPI package file size in bytes. |
| `terraform_module_max_file_size`  | integer | no       | Maximum Terraform Module package file size in bytes. |

```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/application/plan_limits?plan_name=default&conan_max_file_size=3221225472"
```

Example response:

```json
{
  "conan_max_file_size": 3221225472,
  "generic_packages_max_file_size": 5368709120,
  "helm_max_file_size": 5242880,
  "maven_max_file_size": 3221225472,
  "npm_max_file_size": 524288000,
  "nuget_max_file_size": 524288000,
  "pypi_max_file_size": 3221225472,
  "terraform_module_max_file_size": 1073741824
}
```