Develop > API calls > Package APIs > Delete multiple packages

Delete multiple packages

Deletes multiple packages specified by the user.

Packages that are in production stage cannot be deleted. If multiple packages are selected to be deleted, and a selected package is in production stage, an error is displayed an no packages are deleted.

A user in the developer role cannot delete packages that are in the testing stage. If multiple packages are selected by a developer to be deleted, and any of the selected packages are in testing stage, an error is displayed and no packages are deleted.

At least one package must be selected. If no packages are selected to be deleted, an error message is displayed.

Packages that have deployed instances cannot be deleted. You must cancel and delete the deployments before you can delete the package.

URI Method Parameters Returns
http://[host]:[port]/csa/api/codar/app-package/delete POST Path - A list of package IDs.

200 - successful
400 - bad request
401 - not authorized
404 - not found
501 - internal server error

Example

The following URL was sent:

https://localhost:8444/csa/api/codar/app-package/delete

The following JSON was sent:

{
"members": [ {
"packageId":"2090bf73-0f8c-4c34-9737-f5f569c04a4d"},
 {
"packageId":"2090bf73-0f8c-4c34-9737-f5f569c03a3f"}
 ]
}

The following response body was returned if the packages are successfully deleted:

No contents