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
path: root/doc/api
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/graphql/reference/index.md166
-rw-r--r--doc/api/packages/rubygems.md149
-rw-r--r--doc/api/repositories.md12
-rw-r--r--doc/api/users.md12
4 files changed, 296 insertions, 43 deletions
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 67267223fd9..36774757ed3 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -215,7 +215,7 @@ Returns [`Namespace`](#namespace).
Find a package.
-Returns [`Package`](#package).
+Returns [`PackageDetailsType`](#packagedetailstype).
#### Arguments
@@ -1548,6 +1548,34 @@ Composer metadata.
| `composerJson` | [`PackageComposerJsonType!`](#packagecomposerjsontype) | Data of the Composer JSON file. |
| `targetSha` | [`String!`](#string) | Target SHA of the package. |
+### `ConanFileMetadata`
+
+Conan file metadata.
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `conanFileType` | [`ConanMetadatumFileTypeEnum!`](#conanmetadatumfiletypeenum) | Type of the Conan file. |
+| `conanPackageReference` | [`String`](#string) | Reference of the Conan package. |
+| `createdAt` | [`Time!`](#time) | Date of creation. |
+| `id` | [`PackagesConanFileMetadatumID!`](#packagesconanfilemetadatumid) | ID of the metadatum. |
+| `packageRevision` | [`String`](#string) | Revision of the package. |
+| `recipeRevision` | [`String!`](#string) | Revision of the Conan recipe. |
+| `updatedAt` | [`Time!`](#time) | Date of most recent update. |
+
+### `ConanMetadata`
+
+Conan metadata.
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `createdAt` | [`Time!`](#time) | Date of creation. |
+| `id` | [`PackagesConanMetadatumID!`](#packagesconanmetadatumid) | ID of the metadatum. |
+| `packageChannel` | [`String!`](#string) | Channel of the Conan package. |
+| `packageUsername` | [`String!`](#string) | Username of the Conan package. |
+| `recipe` | [`String!`](#string) | Recipe of the Conan package. |
+| `recipePath` | [`String!`](#string) | Recipe path of the Conan package. |
+| `updatedAt` | [`Time!`](#time) | Date of most recent update. |
+
### `ConfigureSastPayload`
Autogenerated return type of ConfigureSast.
@@ -4501,7 +4529,7 @@ Autogenerated return type of OncallScheduleUpdate.
### `Package`
-Represents a package in the Package Registry.
+Represents a package in the Package Registry. Note that this type is in beta and susceptible to changes.
| Field | Type | Description |
| ----- | ---- | ----------- |
@@ -4515,7 +4543,7 @@ Represents a package in the Package Registry.
| `tags` | [`PackageTagConnection`](#packagetagconnection) | Package tags. |
| `updatedAt` | [`Time!`](#time) | Date of most recent update. |
| `version` | [`String`](#string) | Version string. |
-| `versions` | [`PackageWithoutVersionsConnection`](#packagewithoutversionsconnection) | The other versions of the package. |
+| `versions` **{warning-solid}** | [`PackageConnection`](#packageconnection) | **Deprecated** in 13.11. This field is now only returned in the PackageDetailsType. |
### `PackageComposerJsonType`
@@ -4538,6 +4566,25 @@ The connection type for Package.
| `nodes` | [`[Package]`](#package) | A list of nodes. |
| `pageInfo` | [`PageInfo!`](#pageinfo) | Information to aid in pagination. |
+### `PackageDetailsType`
+
+Represents a package details in the Package Registry. Note that this type is in beta and susceptible to changes.
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `createdAt` | [`Time!`](#time) | Date of creation. |
+| `id` | [`PackagesPackageID!`](#packagespackageid) | ID of the package. |
+| `metadata` | [`PackageMetadata`](#packagemetadata) | Package metadata. |
+| `name` | [`String!`](#string) | Name of the package. |
+| `packageFiles` | [`PackageFileConnection`](#packagefileconnection) | Package files. |
+| `packageType` | [`PackageTypeEnum!`](#packagetypeenum) | Package type. |
+| `pipelines` | [`PipelineConnection`](#pipelineconnection) | Pipelines that built the package. |
+| `project` | [`Project!`](#project) | Project where the package is stored. |
+| `tags` | [`PackageTagConnection`](#packagetagconnection) | Package tags. |
+| `updatedAt` | [`Time!`](#time) | Date of most recent update. |
+| `version` | [`String`](#string) | Version string. |
+| `versions` | [`PackageConnection`](#packageconnection) | The other versions of the package. |
+
### `PackageEdge`
An edge in a connection.
@@ -4547,6 +4594,42 @@ An edge in a connection.
| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
| `node` | [`Package`](#package) | The item at the end of the edge. |
+### `PackageFile`
+
+Represents a package file.
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `createdAt` | [`Time!`](#time) | The created date. |
+| `downloadPath` | [`String!`](#string) | Download path of the package file. |
+| `fileMd5` | [`String`](#string) | Md5 of the package file. |
+| `fileMetadata` | [`PackageFileMetadata`](#packagefilemetadata) | File metadata. |
+| `fileName` | [`String!`](#string) | Name of the package file. |
+| `fileSha1` | [`String`](#string) | Sha1 of the package file. |
+| `fileSha256` | [`String`](#string) | Sha256 of the package file. |
+| `id` | [`PackagesPackageFileID!`](#packagespackagefileid) | ID of the file. |
+| `size` | [`String!`](#string) | Size of the package file. |
+| `updatedAt` | [`Time!`](#time) | The updated date. |
+
+### `PackageFileConnection`
+
+The connection type for PackageFile.
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `edges` | [`[PackageFileEdge]`](#packagefileedge) | A list of edges. |
+| `nodes` | [`[PackageFile]`](#packagefile) | A list of nodes. |
+| `pageInfo` | [`PageInfo!`](#pageinfo) | Information to aid in pagination. |
+
+### `PackageFileEdge`
+
+An edge in a connection.
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
+| `node` | [`PackageFile`](#packagefile) | The item at the end of the edge. |
+
### `PackageFileRegistry`
Represents the Geo sync and verification state of a package file.
@@ -4620,42 +4703,6 @@ An edge in a connection.
| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
| `node` | [`PackageTag`](#packagetag) | The item at the end of the edge. |
-### `PackageWithoutVersions`
-
-Represents a version of a package in the Package Registry.
-
-| Field | Type | Description |
-| ----- | ---- | ----------- |
-| `createdAt` | [`Time!`](#time) | Date of creation. |
-| `id` | [`PackagesPackageID!`](#packagespackageid) | ID of the package. |
-| `metadata` | [`PackageMetadata`](#packagemetadata) | Package metadata. |
-| `name` | [`String!`](#string) | Name of the package. |
-| `packageType` | [`PackageTypeEnum!`](#packagetypeenum) | Package type. |
-| `pipelines` | [`PipelineConnection`](#pipelineconnection) | Pipelines that built the package. |
-| `project` | [`Project!`](#project) | Project where the package is stored. |
-| `tags` | [`PackageTagConnection`](#packagetagconnection) | Package tags. |
-| `updatedAt` | [`Time!`](#time) | Date of most recent update. |
-| `version` | [`String`](#string) | Version string. |
-
-### `PackageWithoutVersionsConnection`
-
-The connection type for PackageWithoutVersions.
-
-| Field | Type | Description |
-| ----- | ---- | ----------- |
-| `edges` | [`[PackageWithoutVersionsEdge]`](#packagewithoutversionsedge) | A list of edges. |
-| `nodes` | [`[PackageWithoutVersions]`](#packagewithoutversions) | A list of nodes. |
-| `pageInfo` | [`PageInfo!`](#pageinfo) | Information to aid in pagination. |
-
-### `PackageWithoutVersionsEdge`
-
-An edge in a connection.
-
-| Field | Type | Description |
-| ----- | ---- | ----------- |
-| `cursor` | [`String!`](#string) | A cursor for use in pagination. |
-| `node` | [`PackageWithoutVersions`](#packagewithoutversions) | The item at the end of the edge. |
-
### `PageInfo`
Information about pagination in a connection.
@@ -7536,6 +7583,15 @@ Mode of a commit action.
| `BASE64` | Base64 encoding. |
| `TEXT` | Text encoding. |
+### `ConanMetadatumFileTypeEnum`
+
+Conan file types.
+
+| Value | Description |
+| ----- | ----------- |
+| `PACKAGE_FILE` | A package file type. |
+| `RECIPE_FILE` | A recipe file type. |
+
### `ContainerExpirationPolicyCadenceEnum`
| Value | Description |
@@ -8794,6 +8850,24 @@ A `NoteableID` is a global ID. It is encoded as a string.
An example `NoteableID` is: `"gid://gitlab/Noteable/1"`.
+### `PackagesConanFileMetadatumID`
+
+A `PackagesConanFileMetadatumID` is a global ID. It is encoded as a string.
+
+An example `PackagesConanFileMetadatumID` is: `"gid://gitlab/Packages::Conan::FileMetadatum/1"`.
+
+### `PackagesConanMetadatumID`
+
+A `PackagesConanMetadatumID` is a global ID. It is encoded as a string.
+
+An example `PackagesConanMetadatumID` is: `"gid://gitlab/Packages::Conan::Metadatum/1"`.
+
+### `PackagesPackageFileID`
+
+A `PackagesPackageFileID` is a global ID. It is encoded as a string.
+
+An example `PackagesPackageFileID` is: `"gid://gitlab/Packages::PackageFile/1"`.
+
### `PackagesPackageID`
A `PackagesPackageID` is a global ID. It is encoded as a string.
@@ -8902,6 +8976,7 @@ Represents metadata associated with a Package.
One of:
- [`ComposerMetadata`](#composermetadata)
+- [`ConanMetadata`](#conanmetadata)
#### `VulnerabilityDetail`
@@ -9054,6 +9129,19 @@ Implementations:
| `discussions` | [`DiscussionConnection!`](#discussionconnection) | All discussions on this noteable. |
| `notes` | [`NoteConnection!`](#noteconnection) | All notes on this noteable. |
+#### `PackageFileMetadata`
+
+Represents metadata associated with a Package file.
+
+Implementations:
+
+- [`ConanFileMetadata`](#conanfilemetadata)
+
+| Field | Type | Description |
+| ----- | ---- | ----------- |
+| `createdAt` | [`Time!`](#time) | Date of creation. |
+| `updatedAt` | [`Time!`](#time) | Date of most recent update. |
+
#### `ResolvableInterface`
Implementations:
diff --git a/doc/api/packages/rubygems.md b/doc/api/packages/rubygems.md
new file mode 100644
index 00000000000..426548d5ed2
--- /dev/null
+++ b/doc/api/packages/rubygems.md
@@ -0,0 +1,149 @@
+---
+stage: Package
+group: Package
+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
+---
+
+# Ruby gems API
+
+This is the API documentation for [Ruby gems](../../user/packages/rubygems_registry/index.md).
+
+WARNING:
+This API is used by the [Ruby gems and Bundler package manager clients](https://maven.apache.org/)
+and is generally not meant for manual consumption. This API is under development and is not ready
+for production use due to limited functionality.
+
+For instructions on how to upload and install gems from the GitLab
+package registry, see the [Ruby gems registry documentation](../../user/packages/rubygems_registry/index.md).
+
+NOTE:
+These endpoints do not adhere to the standard API authentication methods.
+See the [Ruby gems registry documentation](../../user/packages/rubygems_registry/index.md)
+for details on which headers and token types are supported.
+
+## Enable the Ruby gems API
+
+The Ruby gems API for GitLab is behind a feature flag that is disabled by default. GitLab
+administrators with access to the GitLab Rails console can enable this API for your instance.
+
+To enable it:
+
+```ruby
+Feature.enable(:rubygem_packages)
+```
+
+To disable it:
+
+```ruby
+Feature.disable(:rubygem_packages)
+```
+
+To enable or disable it for specific projects:
+
+```ruby
+Feature.enable(:rubygem_packages, Project.find(1))
+Feature.disable(:rubygem_packages, Project.find(2))
+```
+
+## Download a gem file
+
+> Introduced in GitLab 13.10.
+
+Download a gem:
+
+```plaintext
+GET projects/:id/packages/rubygems/gems/:file_name
+```
+
+| Attribute | Type | Required | Description |
+| ------------ | ------ | -------- | ----------- |
+| `id` | string | yes | The ID or full path of the project. |
+| `file_name` | string | yes | The name of the `.gem` file. |
+
+```shell
+curl --header "Authorization:<personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/rubygems/gems/my_gem-1.0.0.gem"
+```
+
+Write the output to file:
+
+```shell
+curl --header "Authorization:<personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/rubygems/gems/my_gem-1.0.0.gem" >> my_gem-1.0.0.gem
+```
+
+This writes the downloaded file to `my_gem-1.0.0.gem` in the current directory.
+
+## Fetch a list of dependencies
+
+> Introduced in GitLab 13.10.
+
+Fetch a list of dependencies for a list of gems:
+
+```plaintext
+GET projects/:id/packages/rubygems/api/v1/dependencies
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ------ | -------- | ----------- |
+| `id` | string | yes | The ID or full path of the project. |
+| `gems` | string | no | Comma-separated list of gems to fetch dependencies for. |
+
+```shell
+curl --header "Authorization:<personal_access_token>" "https://gitlab.example.com/api/v4/projects/1/packages/rubygems/api/v1/dependencies?gems=my_gem,foo"
+```
+
+This endpoint returns a marshalled array of hashes for all versions of the requested gems. Since the
+response is marshalled, you can store it in a file. If Ruby is installed, you can use the following
+Ruby command to read the response. For this to work, you must
+[set your credentials in `~/.gem/credentials`](../../user/packages/rubygems_registry/index.md#authenticate-with-a-personal-access-token-or-deploy-token):
+
+```shell
+$ ruby -ropen-uri -rpp -e \
+ 'pp Marshal.load(open("https://gitlab.example.com/api/v4/projects/1/packages/rubygems/api/v1/dependencies?gems=my_gem,rails,foo"))'
+
+[{:name=>"my_gem", :number=>"0.0.1", :platform=>"ruby", :dependencies=>[]},
+ {:name=>"my_gem",
+ :number=>"0.0.3",
+ :platform=>"ruby",
+ :dependencies=>
+ [["dependency_1", "~> 1.2.3"],
+ ["dependency_2", "= 3.0.0"],
+ ["dependency_3", ">= 1.0.0"],
+ ["dependency_4", ">= 0"]]},
+ {:name=>"my_gem",
+ :number=>"0.0.2",
+ :platform=>"ruby",
+ :dependencies=>
+ [["dependency_1", "~> 1.2.3"],
+ ["dependency_2", "= 3.0.0"],
+ ["dependency_3", ">= 1.0.0"],
+ ["dependency_4", ">= 0"]]},
+ {:name=>"foo",
+ :number=>"0.0.2",
+ :platform=>"ruby",
+ :dependencies=>
+ ["dependency_2", "= 3.0.0"],
+ ["dependency_4", ">= 0"]]}]
+```
+
+This writes the downloaded file to `mypkg-1.0-SNAPSHOT.jar` in the current directory.
+
+## Upload a gem
+
+> Introduced in GitLab 13.11.
+
+Upload a gem:
+
+```plaintext
+POST projects/:id/packages/rubygems/api/v1/gems
+```
+
+| Attribute | Type | Required | Description |
+| --------- | ------ | -------- | ----------- |
+| `id` | string | yes | The ID or full path of the project. |
+
+```shell
+curl --request POST \
+ --upload-file path/to/my_gem_file.gem \
+ --header "Authorization:<personal_access_token>" \
+ "https://gitlab.example.com/api/v4/projects/1/packages/rubygems/api/v1/gems"
+```
diff --git a/doc/api/repositories.md b/doc/api/repositories.md
index ba0a200731b..857cd3883c8 100644
--- a/doc/api/repositories.md
+++ b/doc/api/repositories.md
@@ -397,6 +397,18 @@ these as the changelog entries. You can enrich entries with additional data,
such as a link to the merge request or details about the commit author. You can
[customize the format of a changelog](#customize-the-changelog-output) section with a template.
+Trailers can be manually added while editing a commit message. To include a commit
+using the default trailer of `Changelog` and categorize it as a feature, the
+trailer could be added to a commit message like so:
+
+```plaintext
+<Commit message subject>
+
+<Commit message description>
+
+Changelog: feature
+```
+
### Reverted commits
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55537) in GitLab 13.10.
diff --git a/doc/api/users.md b/doc/api/users.md
index 4c35ee0e531..86f1548dac4 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -1213,11 +1213,13 @@ GET /user/emails
[
{
"id": 1,
- "email": "email@example.com"
+ "email": "email@example.com",
+ "confirmed_at" : "2021-03-26T19:07:56.248Z"
},
{
"id": 3,
- "email": "email2@example.com"
+ "email": "email2@example.com",
+ "confirmed_at" : null
}
]
```
@@ -1257,7 +1259,8 @@ Parameters:
```json
{
"id": 1,
- "email": "email@example.com"
+ "email": "email@example.com",
+ "confirmed_at" : "2021-03-26T19:07:56.248Z"
}
```
@@ -1276,7 +1279,8 @@ Parameters:
```json
{
"id": 4,
- "email": "email@example.com"
+ "email": "email@example.com",
+ "confirmed_at" : "2021-03-26T19:07:56.248Z"
}
```