Maven - Update Package Versions

Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.

The project parameter must be supplied if the feed was created in a project. If the feed is not associated with any project, omit the project parameter from the request.

POST https://pkgs.dev.azure.com/{organization}/{project}/_apis/packaging/feeds/{feedId}/maven/packagesbatch?api-version=7.1-preview.1

URI Parameters

Name In Required Type Description
feedId
path True

string

Feed which contains the packages to update.

organization
path True

string

The name of the Azure DevOps organization.

project
path

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.

Request Body

Name Type Description
data

BatchOperationData

Data required to perform the operation. This is optional based on type of operation. Use BatchPromoteData if performing a promote operation.

operation

MavenBatchOperationType

Type of operation that needs to be performed on packages.

packages

MavenMinimalPackageDetails[]

The packages onto which the operation will be performed.

Responses

Name Type Description
200 OK

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.packaging_write Grants the ability to create and read feeds and packages.

Definitions

Name Description
BatchOperationData

Do not attempt to use this type to create a new BatchOperationData. This type does not contain sufficient fields to create a new batch operation data.

MavenBatchOperationType

Type of operation that needs to be performed on packages.

MavenMinimalPackageDetails

Identifies a particular Maven package version

MavenPackagesBatchRequest

A batch of operations to apply to package versions.

BatchOperationData

Do not attempt to use this type to create a new BatchOperationData. This type does not contain sufficient fields to create a new batch operation data.

MavenBatchOperationType

Type of operation that needs to be performed on packages.

Name Type Description
delete

string

Delete package versions. Not supported in the Recycle Bin.

permanentDelete

string

Permanently delete package versions. Only supported in the Recycle Bin.

promote

string

Promote package versions to a release view. If constructing a MavenPackagesBatchRequest object with this type, use BatchPromoteData for its Data property. Not supported in the Recycle Bin.

restoreToFeed

string

Restore unpublished package versions to the feed. Only supported in the Recycle Bin.

MavenMinimalPackageDetails

Identifies a particular Maven package version

Name Type Description
artifact

string

Package artifact ID

group

string

Package group ID

version

string

Package version

MavenPackagesBatchRequest

A batch of operations to apply to package versions.

Name Type Description
data

BatchOperationData

Data required to perform the operation. This is optional based on type of operation. Use BatchPromoteData if performing a promote operation.

operation

MavenBatchOperationType

Type of operation that needs to be performed on packages.

packages

MavenMinimalPackageDetails[]

The packages onto which the operation will be performed.