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

This feature was introduced in GitLab 12.6

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path

Responses

CodeDescriptionSchema
200OKAPIEntitiesNugetServiceIndex
400Bad Request—
404Not Found—

The NuGet Metadata Service - Package name level

GET /api/v4/groups/{id}/-/packages/nuget/metadata/{package_name}/index

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path
package_name
Path, required
StringThe NuGet package name
Example: MyNuGetPkg

Responses

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

The NuGet Metadata Service - Package name and version level

GET /api/v4/groups/{id}/-/packages/nuget/metadata/{package_name}/{package_version}

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path
package_name
Path, required
StringThe NuGet package name
Example: MyNuGetPkg
package_version
Path, required
StringThe NuGet package version
Pattern: [^\/]+
Example: 1.0.0

Responses

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

The NuGet Search Service

GET /api/v4/groups/{id}/-/packages/nuget/query

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path
q
Query
StringThe search term
Example: MyNuGet
skip
Query
IntegerThe number of results to skip
Default: 0
Example: 1
take
Query
IntegerThe number of results to return
Default: 20
Example: 1
prerelease
Query
BooleanInclude prerelease versions
Default: true

Responses

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

The NuGet Symbol File Download Endpoint

GET /api/v4/groups/{id}/-/packages/nuget/symbolfiles/{file_name}/{signature}/{same_file_name}

This feature was introduced in GitLab 16.7

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path
file_name
Path, required
StringThe symbol file name
Pattern: [^\/]+
Example: mynugetpkg.pdb
signature
Path, required
StringThe symbol file signature
Pattern: [^\/]+
Example: k813f89485474661234z7109cve5709eFFFFFFFF
same_file_name
Path, required
StringThe symbol file name. Must match the ‘file_name’ parameter

Responses

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

The NuGet V2 Feed Service Index

GET /api/v4/groups/{id}/-/packages/nuget/v2

This feature was introduced in GitLab 16.2

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not Found—

The NuGet V2 Feed Package $metadata endpoint

GET /api/v4/groups/{id}/-/packages/nuget/v2/$metadata

This feature was introduced in GitLab 16.3

Parameters

NameTypeDescription
id
Path, required
Integer or stringThe group ID or full group path

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not 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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (multipart/form-data)

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

Responses

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

The NuGet Package Authorize endpoint

PUT /api/v4/projects/{id}/packages/nuget/authorize

This feature was introduced in GitLab 14.1

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

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

The NuGet Content Service - index request

GET /api/v4/projects/{id}/packages/nuget/download/{package_name}/index

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
package_name
Path, required
StringThe NuGet package name
Example: mynugetpkg.1.3.0.17.nupkg

Responses

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

The NuGet Content Service - content request

GET /api/v4/projects/{id}/packages/nuget/download/{package_name}/{package_version}/{package_filename}

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
package_name
Path, required
StringThe NuGet package name
Example: mynugetpkg.1.3.0.17.nupkg
package_version
Path, required
StringThe NuGet package version
Pattern: [^\/]+
Example: 1.3.0.17
package_filename
Path, required
StringThe NuGet package filename
Pattern: [^\/]+
Example: mynugetpkg.1.3.0.17.nupkg

Responses

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

The NuGet V3 Feed Service Index

GET /api/v4/projects/{id}/packages/nuget/index

This feature was introduced in GitLab 12.6

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

CodeDescriptionSchema
200OKAPIEntitiesNugetServiceIndex
400Bad Request—
404Not Found—

The NuGet Metadata Service - Package name level

GET /api/v4/projects/{id}/packages/nuget/metadata/{package_name}/index

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
package_name
Path, required
StringThe NuGet package name
Example: MyNuGetPkg

Responses

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

The NuGet Metadata Service - Package name and version level

GET /api/v4/projects/{id}/packages/nuget/metadata/{package_name}/{package_version}

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
package_name
Path, required
StringThe NuGet package name
Example: MyNuGetPkg
package_version
Path, required
StringThe NuGet package version
Pattern: [^\/]+
Example: 1.0.0

Responses

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

The NuGet Search Service

GET /api/v4/projects/{id}/packages/nuget/query

This feature was introduced in GitLab 12.8

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
q
Query
StringThe search term
Example: MyNuGet
skip
Query
IntegerThe number of results to skip
Default: 0
Example: 1
take
Query
IntegerThe number of results to return
Default: 20
Example: 1
prerelease
Query
BooleanInclude prerelease versions
Default: true

Responses

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

The NuGet Symbol File Download Endpoint

GET /api/v4/projects/{id}/packages/nuget/symbolfiles/{file_name}/{signature}/{same_file_name}

This feature was introduced in GitLab 16.7

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
file_name
Path, required
StringThe symbol file name
Pattern: [^\/]+
Example: mynugetpkg.pdb
signature
Path, required
StringThe symbol file signature
Pattern: [^\/]+
Example: k813f89485474661234z7109cve5709eFFFFFFFF
same_file_name
Path, required
StringThe symbol file name. Must match the ‘file_name’ parameter

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
403Forbidden—
404Not 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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (multipart/form-data)

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

Responses

CodeDescriptionSchema
201Created—
400Bad Request—
401Unauthorized—
403Forbidden—
404Not 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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

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

The NuGet V2 Feed Service Index

GET /api/v4/projects/{id}/packages/nuget/v2

This feature was introduced in GitLab 16.2

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not 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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (multipart/form-data)

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

Responses

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

The NuGet V2 Feed Package $metadata endpoint

GET /api/v4/projects/{id}/packages/nuget/v2/$metadata

This feature was introduced in GitLab 16.3

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not 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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Responses

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

The NuGet Package Delete endpoint

DELETE /api/v4/projects/{id}/packages/nuget/{package_name}/{package_version}

This feature was introduced in GitLab 16.5

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
package_name
Path, required
StringThe NuGet package name
Pattern: ^[\-+._a-zA-Z0-9]+$
Example: mynugetpkg
package_version
Path, required
StringThe NuGet package version
Pattern: ^(?:(0|[1-9]\d*))\.(?:(0|[1-9]\d*))(\.(?:(0|[1-9]\d*)))?(\.\d*)?(?:(?:-((?:\d*[a-zA-Z\-][0-9a-zA-Z\-]*|[1-9]\d*|0)(?:\.(?:\d*[a-zA-Z\-][0-9a-zA-Z\-]*|[1-9]\d*|0))*))?(?:\+([0-9a-zA-Z\-]+(?:\.[0-9a-zA-Z\-]+)*))?)$
Example: 1.0.1

Responses

CodeDescriptionSchema
204No Content—
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

The NuGet V2 Feed Find Packages by ID endpoint

GET /api/v4/projects/{project_id}/packages/nuget/v2/FindPackagesById()

This feature was introduced in GitLab 16.4

Parameters

NameTypeDescription
project_id
Path, required
String or integerThe ID or URL-encoded path of the project
id
Query, required
StringThe NuGet package name
Pattern: ^[\-+._a-zA-Z0-9]+$
Example: mynugetpkg

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not Found—

The NuGet V2 Feed Enumerate Packages endpoint

GET /api/v4/projects/{project_id}/packages/nuget/v2/Packages()

This feature was introduced in GitLab 16.4

Parameters

NameTypeDescription
project_id
Path, required
String or integerThe ID or URL-encoded path of the project
$filter
Query, required
StringThe NuGet package name
Pattern: ^[\-+._a-zA-Z0-9]+$
Example: mynugetpkg

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not 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}')

This feature was introduced in GitLab 16.4

Parameters

NameTypeDescription
project_id
Path, required
String or integerThe ID or URL-encoded path of the project
package_name
Path, required
StringThe NuGet package name
Pattern: ^[\-+._a-zA-Z0-9]+$
Example: mynugetpkg
package_version
Path, required
StringThe NuGet package version
Pattern: ^(?:(0|[1-9]\d*))\.(?:(0|[1-9]\d*))(\.(?:(0|[1-9]\d*)))?(\.\d*)?(?:(?:-((?:\d*[a-zA-Z\-][0-9a-zA-Z\-]*|[1-9]\d*|0)(?:\.(?:\d*[a-zA-Z\-][0-9a-zA-Z\-]*|[1-9]\d*|0))*))?(?:\+([0-9a-zA-Z\-]+(?:\.[0-9a-zA-Z\-]+)*))?)$
Example: 1.3.0.17

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
404Not Found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesNugetDependency

PropertyTypeDescription
@idStringExample: http://gitlab.com/Sandbox.App/1.0.0.json#dependency
@typeStringExample: PackageDependency
idStringExample: Dependency
rangeStringExample: 2.0.0

APIEntitiesNugetDependencyGroup

PropertyTypeDescription
@idStringExample: http://gitlab.com/Sandbox.App/1.0.0.json#dependencygroup
@typeStringExample: PackageDependencyGroup
dependenciesArray of APIEntitiesNugetDependency—
targetFrameworkStringExample: fwk test

APIEntitiesNugetPackageMetadata

PropertyTypeDescription
@idStringExample: https://gitlab.example.com/api/v4/projects/1/packages/nuget/metadata/MyNuGetPkg/1.3.0.17.json
catalogEntryAPIEntitiesNugetPackageMetadataCatalogEntry—
packageContentStringExample: https://gitlab.example.com/api/v4/projects/1/packages/nuget/download/MyNuGetPkg/1.3.0.17/helloworld.1.3.0.17.nupkg

APIEntitiesNugetPackageMetadataCatalogEntry

PropertyTypeDescription
@idStringExample: https://gitlab.example.com/api/v4/projects/1/packages/nuget/metadata/MyNuGetPkg/1.3.0.17.json
authorsStringExample: Authors
dependencyGroupsArray of APIEntitiesNugetDependencyGroup—
descriptionStringExample: Description
iconUrlStringExample: http://sandbox.com/icon
idStringExample: MyNuGetPkg
licenseUrlStringExample: http://sandbox.com/license
packageContentStringExample: https://gitlab.example.com/api/v4/projects/1/packages/nuget/download/MyNuGetPkg/1.3.0.17/helloworld.1.3.0.17.nupkg
projectUrlStringExample: http://sandbox.com/project
publishedStringExample: 2023-05-08T17:23:25Z
summaryStringExample: Description
tagsStringExample: tag#1 tag#2
versionStringExample: 1.3.0.17

APIEntitiesNugetPackagesMetadata

PropertyTypeDescription
countIntegerExample: 1
itemsArray of APIEntitiesNugetPackagesMetadataItem—

APIEntitiesNugetPackagesMetadataItem

PropertyTypeDescription
@idStringExample: https://gitlab.example.com/api/v4/projects/1/packages/nuget/metadata/MyNuGetPkg/1.3.0.17.json
countIntegerExample: 1
itemsArray of APIEntitiesNugetPackageMetadata—
lowerStringExample: 1.3.0.17
upperStringExample: 1.3.0.17

APIEntitiesNugetPackagesVersions

PropertyTypeDescription
versionsArray of stringsExample: ["1.3.0.17"]

APIEntitiesNugetSearchResult

PropertyTypeDescription
@typeStringExample: Package
authorsStringExample: Authors
descriptionStringExample: Description
iconUrlStringExample: http://sandbox.com/icon
idStringExample: MyNuGetPkg
licenseUrlStringExample: http://sandbox.com/license
projectUrlStringExample: http://sandbox.com/project
summaryStringExample: Description
tagsStringExample: tag#1 tag#2
titleStringExample: MyNuGetPkg
totalDownloadsIntegerExample: 1
verifiedBoolean—
versionStringExample: 1.3.0.17
versionsAPIEntitiesNugetSearchResultVersion—

APIEntitiesNugetSearchResults

PropertyTypeDescription
dataArray of APIEntitiesNugetSearchResult—
totalHitsIntegerExample: 1

APIEntitiesNugetSearchResultVersion

PropertyTypeDescription
@idStringExample: https://gitlab.example.com/api/v4/projects/1/packages/nuget/metadata/MyNuGetPkg/1.3.0.17.json
downloadsIntegerExample: 1
versionStringExample: 1.3.0.17

APIEntitiesNugetServiceIndex

PropertyTypeDescription
resourcesArray of objectsExample: [{"@id":"https://gitlab.com/api/v4/projects/1/packages/nuget/query","@type":"SearchQueryService","comment":"Filter and search for packages by keyword."}]
versionStringExample: 1.3.0.17