Use this API to interact with the Ruby gems and Bundler package manager clients.

This API is used by the Ruby gems and Bundler package manager clients and is generally not meant for manual consumption. This API is under development and is not ready for production use due to limited functionality.

These endpoints do not adhere to the standard API authentication methods. See the Ruby gems registry documentation for details on which headers and token types are supported. Undocumented authentication methods might be removed in the future.

Retrieve dependencies

GET /api/v4/projects/{id}/packages/rubygems/api/v1/dependencies

Retrieves a list of dependencies for specified gems. The response is a marshalled array of hashes for all versions of the requested gems. Because the response is marshalled, you can store it in a file.

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe ID or URL-encoded path of the project
gems
Query
Array of stringsComma delimited gem names

Responses

CodeDescriptionSchema
200OKString (binary) (application/octet-stream)
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

Upload a gem

POST /api/v4/projects/{id}/packages/rubygems/api/v1/gems

Uploads a gem for a specified project.

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe ID or URL-encoded path of the project

Request body (multipart/form-data)

PropertyTypeDescription
file
Required
String (binary)The package file to be published (generated by Multipart middleware)

Responses

CodeDescriptionSchema
201Created—
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

Authorize a gem upload from workhorse

POST /api/v4/projects/{id}/packages/rubygems/api/v1/gems/authorize

This feature was introduced in GitLab 13.9

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe ID or URL-encoded path of the project

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

Download a gem file

GET /api/v4/projects/{id}/packages/rubygems/gems/{file_name}

Downloads a specified gem file for a project.

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe ID or URL-encoded path of the project
file_name
Path, required
StringPackage file name

Responses

CodeDescriptionSchema
200OKString (binary) (application/octet-stream)
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

Download a gemspec file

GET /api/v4/projects/{id}/packages/rubygems/quick/Marshal.4.8/{file_name}

Downloads a gemspec file in Marshal format for a specified gem version.

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe ID or URL-encoded path of the project
file_name
Path, required
StringGemspec file name

Responses

CodeDescriptionSchema
200OKString (binary) (application/octet-stream)
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

Download the spec index file

GET /api/v4/projects/{id}/packages/rubygems/{file_name}

Downloads a RubyGems spec index file (specs.4.8.gz, latest_specs.4.8.gz, or prerelease_specs.4.8.gz) for a project.

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe ID or URL-encoded path of the project
file_name
Path, required
StringSpec file name
Allowed values: specs.4.8.gz, latest_specs.4.8.gz, prerelease_specs.4.8.gz
Minimum length: 1

Responses

CodeDescriptionSchema
200OKString (binary) (application/octet-stream)
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—