Python - 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}/pypi/packagesbatch?api-version=7.0-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
feed
|
path | True |
string |
Name or ID of the feed. |
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.0-preview.1' to use this version of the api. |
Request Body
Name | Type | Description |
---|---|---|
data |
Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation. |
|
operation |
Type of operation that needs to be performed on packages. |
|
packages |
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 |
---|---|
Batch |
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. |
Minimal |
Minimal package details required to identify a package within a protocol. |
Py |
Type of operation that needs to be performed on packages. |
Py |
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.
MinimalPackageDetails
Minimal package details required to identify a package within a protocol.
Name | Type | Description |
---|---|---|
id |
string |
Package name. |
version |
string |
Package version. |
PyPiBatchOperationType
Type of operation that needs to be performed on packages.
Name | Type | Description |
---|---|---|
delete |
string |
Move package versions to the feed's Recycle Bin. 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 PyPiPackagesBatchRequest object with this type, use BatchPromoteData for its Data property. Not supported in the Recycle Bin. |
restoreToFeed |
string |
Restore deleted package versions to the feed. Only supported in the Recycle Bin. |
PyPiPackagesBatchRequest
A batch of operations to apply to package versions.
Name | Type | Description |
---|---|---|
data |
Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation. |
|
operation |
Type of operation that needs to be performed on packages. |
|
packages |
The packages onto which the operation will be performed. |