Use this API to interact with the NuGet package manager client.
This API is used by the NuGet package manager client and is generally not meant for manual consumption.
These endpoints do not adhere to the standard API authentication methods. See the NuGet package registry documentation for details on which headers and token types are supported. Undocumented authentication methods might be removed in the future.
The NuGet V3 Feed Service Index
GET /api/v4/groups/{id}/-/packages/nuget/index
Retrieves a list of available API resources. This endpoint can be accessed without authentication. The URLs in the response use the same route prefix as the request. With the group-level prefix, the URLs contain /groups/:id/-. This feature was introduced in GitLab 12.6
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
The NuGet Metadata Service - Package name level
GET /api/v4/groups/{id}/-/packages/nuget/metadata/{package_name}/index
Retrieves metadata for a specified package. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
package_Path, | String | The Nu Example: My |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Metadata Service - Package name and version level
GET /api/v4/groups/{id}/-/packages/nuget/metadata/{package_name}/{package_version}
Retrieves metadata for a specified package version. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
package_Path, | String | The Nu Example: My |
package_Path, | String | The Nu Pattern: [^\/Example: 1. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Search Service
GET /api/v4/groups/{id}/-/packages/nuget/query
Searches for NuGet packages in the repository based on a specified query. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
qQuery | String | Search term Example: My |
skipQuery | Integer | Number of results to skip Default: 0Example: 1 |
takeQuery | Integer | Number of results to return Default: 20Example: 1 |
prereleaseQuery | Boolean | If true,Default: true |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Symbol File Download Endpoint
GET /api/v4/groups/{id}/-/packages/nuget/symbolfiles/{file_name}/{signature}/{same_file_name}
Downloads a specified debugging symbol file (.pdb). Requires the Symbolchecksum header with the SHA256 checksum of the file, in the format SHA256:<checksum>. This feature was introduced in GitLab 16.7
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
file_Path, | String | The symbol file name Pattern: [^\/Example: mynugetpkg. |
signaturePath, | String | The symbol file signature Pattern: [^\/Example: k813f89485474661234z |
same_Path, | String | The symbol file name. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet V2 Feed Service Index
GET /api/v4/groups/{id}/-/packages/nuget/v2
Retrieves an XML document that represents the service index of the NuGet v2 source feed. This endpoint can be accessed without authentication. This feature was introduced in GitLab 16.2
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
The NuGet V2 Feed Package $metadata endpoint
GET /api/v4/groups/{id}/-/packages/nuget/v2/$metadata
Returns metadata for the available endpoints in a NuGet v2 feed, as an OData EDMX XML document. This endpoint can be accessed without authentication. This feature was introduced in GitLab 16.3
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer or string | ID of the group |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
Upload a NuGet v3 package file for a project
PUT /api/v4/projects/{id}/packages/nuget
Uploads a NuGet v3 package file for a specified project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Request body (multipart/form-data)
| Property | Type | Description |
|---|---|---|
packageRequired | String (binary) | The package file to be published (generated by Multipart middleware) |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Package Authorize endpoint
PUT /api/v4/projects/{id}/packages/nuget/authorize
This feature was introduced in GitLab 14.1
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Content Service - index request
GET /api/v4/projects/{id}/packages/nuget/download/{package_name}/index
Retrieves the index for a specified package, which includes a list of available versions. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
package_Path, | String | The Nu Example: mynugetpkg. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Content Service - content request
GET /api/v4/projects/{id}/packages/nuget/download/{package_name}/{package_version}/{package_filename}
Downloads a specified NuGet package file for a project. The package metadata service provides this URL. This endpoint exists only at the project-level route prefix, so a request with the group-level prefix returns 404. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
package_Path, | String | The Nu Example: mynugetpkg. |
package_Path, | String | The Nu Pattern: [^\/Example: 1. |
package_Path, | String | The Nu Pattern: [^\/Example: mynugetpkg. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet V3 Feed Service Index
GET /api/v4/projects/{id}/packages/nuget/index
Retrieves a list of available API resources. This endpoint can be accessed without authentication. The URLs in the response use the same route prefix as the request. With the group-level prefix, the URLs contain /groups/:id/-. This feature was introduced in GitLab 12.6
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
The NuGet Metadata Service - Package name level
GET /api/v4/projects/{id}/packages/nuget/metadata/{package_name}/index
Retrieves metadata for a specified package. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
package_Path, | String | The Nu Example: My |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Metadata Service - Package name and version level
GET /api/v4/projects/{id}/packages/nuget/metadata/{package_name}/{package_version}
Retrieves metadata for a specified package version. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
package_Path, | String | The Nu Example: My |
package_Path, | String | The Nu Pattern: [^\/Example: 1. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Search Service
GET /api/v4/projects/{id}/packages/nuget/query
Searches for NuGet packages in the repository based on a specified query. This feature was introduced in GitLab 12.8
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
qQuery | String | Search term Example: My |
skipQuery | Integer | Number of results to skip Default: 0Example: 1 |
takeQuery | Integer | Number of results to return Default: 20Example: 1 |
prereleaseQuery | Boolean | If true,Default: true |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Symbol File Download Endpoint
GET /api/v4/projects/{id}/packages/nuget/symbolfiles/{file_name}/{signature}/{same_file_name}
Downloads a specified debugging symbol file (.pdb). Requires the Symbolchecksum header with the SHA256 checksum of the file, in the format SHA256:<checksum>. This feature was introduced in GitLab 16.7
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
file_Path, | String | The symbol file name Pattern: [^\/Example: mynugetpkg. |
signaturePath, | String | The symbol file signature Pattern: [^\/Example: k813f89485474661234z |
same_Path, | String | The symbol file name. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
403 | Forbidden | — |
404 | Not Found | — |
Upload a NuGet symbol package file
PUT /api/v4/projects/{id}/packages/nuget/symbolpackage
Uploads a specified NuGet symbol package file (.snupkg) for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Request body (multipart/form-data)
| Property | Type | Description |
|---|---|---|
packageRequired | String (binary) | The package file to be published (generated by Multipart middleware) |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Symbol Package Authorize endpoint
PUT /api/v4/projects/{id}/packages/nuget/symbolpackage/authorize
This feature was introduced in GitLab 14.1
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet V2 Feed Service Index
GET /api/v4/projects/{id}/packages/nuget/v2
Retrieves an XML document that represents the service index of the NuGet v2 source feed. This endpoint can be accessed without authentication. This feature was introduced in GitLab 16.2
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
Upload a NuGet v2 package file for a project
PUT /api/v4/projects/{id}/packages/nuget/v2
Uploads a NuGet v2 package file for a specified project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Request body (multipart/form-data)
| Property | Type | Description |
|---|---|---|
packageRequired | String (binary) | The package file to be published (generated by Multipart middleware) |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet V2 Feed Package $metadata endpoint
GET /api/v4/projects/{id}/packages/nuget/v2/$metadata
Returns metadata for the available endpoints in a NuGet v2 feed, as an OData EDMX XML document. This endpoint can be accessed without authentication. This feature was introduced in GitLab 16.3
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
The NuGet V2 Feed Package Authorize endpoint
PUT /api/v4/projects/{id}/packages/nuget/v2/authorize
This feature was introduced in GitLab 16.2
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet Package Delete endpoint
DELETE /api/v4/projects/{id}/packages/nuget/{package_name}/{package_version}
Deletes a specified NuGet package. This feature was introduced in GitLab 16.5
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID of the project |
package_Path, | String | The Nu Pattern: ^[\-Example: mynugetpkg |
package_Path, | String | The Nu Pattern: ^(?:Example: 1. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
The NuGet V2 Feed Find Packages by ID endpoint
GET /api/v4/projects/{project_id}/packages/nuget/v2/FindPackagesById()
Returns an OData XML document that contains information about the package with the given name. The endpoint does not receive an authentication token, so it cannot return the latest version of the package. The version must be provided when a package is installed or upgraded with the NuGet v2 feed. This feature was introduced in GitLab 16.4
Parameters
| Name | Type | Description |
|---|---|---|
project_Path, | String or integer | ID of the project |
idQuery, | String | Name of the Nu Pattern: ^[\-Example: mynugetpkg |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
The NuGet V2 Feed Enumerate Packages endpoint
GET /api/v4/projects/{project_id}/packages/nuget/v2/Packages()
Returns an OData XML document that contains information about the package with the given name. The endpoint does not receive an authentication token, so it cannot return the latest version of the package. The version must be provided when a package is installed or upgraded with the NuGet v2 feed. This feature was introduced in GitLab 16.4
Parameters
| Name | Type | Description |
|---|---|---|
project_Path, | String or integer | ID of the project |
$filterQuery, | String | OData filter expression with the Nutolower(Id) eq '<package_Pattern: ^[\-Example: mynugetpkg |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
The NuGet V2 Feed Single Package Metadata endpoint
GET /api/v4/projects/{project_id}/packages/nuget/v2/Packages(Id='{package_name}',Version='{package_version}')
Returns an OData XML document that contains information about the package with the given name and version. This feature was introduced in GitLab 16.4
Parameters
| Name | Type | Description |
|---|---|---|
project_Path, | String or integer | ID of the project |
package_Path, | String | The Nu Pattern: ^[\-Example: mynugetpkg |
package_Path, | String | The Nu Pattern: ^(?:Example: 1. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesNugetDependency
| Property | Type | Description |
|---|---|---|
@id | String | Example:http: |
@type | String | Example:Package |
id | String | Example:Dependency |
range | String | Example:2. |
APIEntitiesNugetDependencyGroup
| Property | Type | Description |
|---|---|---|
@id | String | Example:http: |
@type | String | Example:Package |
dependencies | Array of APIEntities | — |
target | String | Example:fwk test |
APIEntitiesNugetPackageMetadata
| Property | Type | Description |
|---|---|---|
@id | String | Example:https: |
catalog | APIEntities | — |
package | String | Example:https: |
APIEntitiesNugetPackageMetadataCatalogEntry
| Property | Type | Description |
|---|---|---|
@id | String | Example:https: |
authors | String | Example:Authors |
dependency | Array of APIEntities | — |
description | String | Example:Description |
icon | String | Example:http: |
id | String | Example:My |
license | String | Example:http: |
package | String | Example:https: |
project | String | Example:http: |
published | String | Example:2023- |
summary | String | Example:Description |
tags | String | Example:tag#1 tag#2 |
version | String | Example:1. |
APIEntitiesNugetPackagesMetadata
| Property | Type | Description |
|---|---|---|
count | Integer | Example:1 |
items | Array of APIEntities | — |
APIEntitiesNugetPackagesMetadataItem
| Property | Type | Description |
|---|---|---|
@id | String | Example:https: |
count | Integer | Example:1 |
items | Array of APIEntities | — |
lower | String | Example:1. |
upper | String | Example:1. |
APIEntitiesNugetPackagesVersions
| Property | Type | Description |
|---|---|---|
versions | Array of strings | Example:["1. |
APIEntitiesNugetSearchResult
| Property | Type | Description |
|---|---|---|
@type | String | Example:Package |
authors | String | Example:Authors |
description | String | Example:Description |
icon | String | Example:http: |
id | String | Example:My |
license | String | Example:http: |
project | String | Example:http: |
summary | String | Example:Description |
tags | String | Example:tag#1 tag#2 |
title | String | Example:My |
total | Integer | Example:1 |
verified | Boolean | — |
version | String | Example:1. |
versions | Array of APIEntities | — |
APIEntitiesNugetSearchResults
| Property | Type | Description |
|---|---|---|
data | Array of APIEntities | — |
total | Integer | Example:1 |
APIEntitiesNugetSearchResultVersion
| Property | Type | Description |
|---|---|---|
@id | String | Example:https: |
downloads | Integer | Example:1 |
version | String | Example:1. |
APIEntitiesNugetServiceIndex
| Property | Type | Description |
|---|---|---|
resources | Array of objects | Example:[{"@id": |
version | String | Example:1. |