diff options
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/import.md | 4 | ||||
-rw-r--r-- | doc/api/managed_licenses.md | 150 | ||||
-rw-r--r-- | doc/api/project_import_export.md | 12 |
3 files changed, 16 insertions, 150 deletions
diff --git a/doc/api/import.md b/doc/api/import.md index e762de4a0fa..7f25e9236c3 100644 --- a/doc/api/import.md +++ b/doc/api/import.md @@ -19,9 +19,7 @@ Prerequisites: - [Prerequisites for GitHub importer](../user/project/import/github.md#prerequisites). - The namespace set in `target_namespace` must exist. -- The namespace can be your user namespace or an existing group that you have at least the Maintainer role for. Using - the Developer role for this purpose was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/387891) in GitLab - 15.8 and will be removed in GitLab 16.0. +- The namespace can be your user namespace or an existing group that you have at least the Maintainer role for. ```plaintext POST /import/github diff --git a/doc/api/managed_licenses.md b/doc/api/managed_licenses.md index b98be629e90..e7ac247ae4a 100644 --- a/doc/api/managed_licenses.md +++ b/doc/api/managed_licenses.md @@ -2,148 +2,16 @@ stage: Fulfillment group: Utilization info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +remove_date: '2023-08-22' +redirect_to: 'index.md' --- -# Managed Licenses API (deprecated) **(ULTIMATE)** +# Managed Licenses API (removed) **(ULTIMATE)** -WARNING: -This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/390417) in GitLab 15.9. +This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/390417) in GitLab 15.9 +and [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/397067) in 16.0. -WARNING: -"approval" and "blacklisted" approval statuses are changed to "allowed" and "denied" in GitLab 15.0. - -## List managed licenses - -Get all managed licenses for a given project. - -```plaintext -GET /projects/:id/managed_licenses -``` - -| Attribute | Type | Required | Description | -| --------- | ------- | -------- | --------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) | - -```shell -curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses" -``` - -Example response: - -```json -[ - { - "id": 1, - "name": "MIT", - "approval_status": "allowed" - }, - { - "id": 3, - "name": "ISC", - "approval_status": "denied" - } -] -``` - -## Show an existing managed license - -Shows an existing managed license. - -```plaintext -GET /projects/:id/managed_licenses/:managed_license_id -``` - -| Attribute | Type | Required | Description | -| --------------- | ------- | --------------------------------- | ------------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user | -| `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project | - -```shell -curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6" -``` - -Example response: - -```json -{ - "id": 1, - "name": "MIT", - "approval_status": "denied" -} -``` - -## Create a new managed license - -Creates a new managed license for the given project with the given name and approval status. - -```plaintext -POST /projects/:id/managed_licenses -``` - -| Attribute | Type | Required | Description | -| ------------- | ------- | -------- | ---------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user | -| `name` | string | yes | The name of the managed license | -| `approval_status` | string | yes | The approval status of the license. "allowed" or "denied". | - -```shell -curl --data "name=MIT&approval_status=denied" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses" -``` - -Example response: - -```json -{ - "id": 1, - "name": "MIT", - "approval_status": "allowed" -} -``` - -## Delete a managed license - -Deletes a managed license with a given ID. - -```plaintext -DELETE /projects/:id/managed_licenses/:managed_license_id -``` - -| Attribute | Type | Required | Description | -| --------- | ------- | -------- | --------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user | -| `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project | - -```shell -curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/4" -``` - -When successful, it replies with an HTTP 204 response. - -## Edit an existing managed license - -Updates an existing managed license with a new approval status. - -```plaintext -PATCH /projects/:id/managed_licenses/:managed_license_id -``` - -| Attribute | Type | Required | Description | -| --------------- | ------- | --------------------------------- | ------------------------------- | -| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding) owned by the authenticated user | -| `managed_license_id` | integer/string | yes | The ID or URL-encoded name of the license belonging to the project | -| `approval_status` | string | yes | The approval status of the license. "allowed" or "denied". | - -```shell -curl --request PATCH --data "approval_status=denied" \ - --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/managed_licenses/6" -``` - -Example response: - -```json -{ - "id": 1, - "name": "MIT", - "approval_status": "denied" -} -``` +<!-- This redirect file can be deleted after <2023-08-22>. --> +<!-- Redirects that point to other docs in the same project expire in three months. --> +<!-- Redirects that point to docs in a different project or site (link is not relative and starts with `https:`) expire in one year. --> +<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html --> diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md index 15f2e878570..a162bc3e5af 100644 --- a/doc/api/project_import_export.md +++ b/doc/api/project_import_export.md @@ -146,12 +146,12 @@ POST /projects/import | Attribute | Type | Required | Description | | ----------- | -------------- | -------- | ---------------------------------------- | -| `file` | string | yes | The file to be uploaded. -| `path` | string | yes | Name and path for new project. -| `name` | string | no | The name of the project to be imported. Defaults to the path of the project if not provided. -| `namespace` | integer or string | no | The ID or path of the namespace to import the project to. Defaults to the current user's namespace.<br/><br/> Requires at least the Maintainer role on the destination group to import to. Using the Developer role for this purpose was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/387891) in GitLab 15.8 and is scheduled for removal in GitLab 16.0. -| `override_params` | Hash | no | Supports all fields defined in the [Project API](projects.md). -| `overwrite` | boolean | no | If there is a project with the same path the import overwrites it. Defaults to `false`. +| `file` | string | yes | The file to be uploaded. | +| `path` | string | yes | Name and path for new project. | +| `name` | string | no | The name of the project to be imported. Defaults to the path of the project if not provided. | +| `namespace` | integer or string | no | The ID or path of the namespace to import the project to. Defaults to the current user's namespace.<br/><br/> Requires at least the Maintainer role on the destination group to import to. | +| `override_params` | Hash | no | Supports all fields defined in the [Project API](projects.md). | +| `overwrite` | boolean | no | If there is a project with the same path the import overwrites it. Defaults to `false`. | The override parameters passed take precedence over all values defined inside the export file. |