When trying to create a new deployment plan the error message appears "There is already an existing deployment plan with the same name and build under this project. The existing deployment plan may be archived if previously deleted." despite the fact that there are no such plans can be found in Nolio GUI.
Nolio 6.8
Product limitation:
A deployment plan with exactly the same name and build was deleted. It led to archiving the plan instead of deletion.
The deleted/archived deployment plan should be renamed via REST API. Then, a new deployment pan can reuse the original name and build.
REST API call:
PUT /datamanagement/a/releasecandidates/${depPlanId}
{
"name": "${newDepPlanName}",
"buildVersion": "${newDepPlanBuildNum}",
"versionId": "${projectId}"
}
A detailed plan can be as follows:
1. Find parameters of the deleted deployment plan using SQL and Swagger UI.
2. Use the obtained values at step 1 to create an internal API call (PUT request) to change the Name and/or the Build of the deleted deployment plan.
After that you will be able to create a new deployment plan with the desired values for the Name and the Build.
In details:
Use the following Python (3.13) code (or use specialized software to execute PUT request) to call internal API:
import requests
import base64
# === Configuration ===
base_url = "http://<server_ip>:8080"
depPlanId = "2"
newDepPlanName = "New_plan_name_here"
newDepPlanBuildNum = "123"
projectId = "1"
# === Encode username:password to Base64 ===
username = "<username>"
password = "<password>"
auth_str = f"{username}:{password}"
auth_bytes = auth_str.encode("utf-8")
auth_base64 = base64.b64encode(auth_bytes).decode("utf-8")
headers = {
"Authorization": f"Basic {auth_base64}",
"Content-Type": "application/json"
}
# === Payload ===
payload = {
"name": newDepPlanName,
"buildVersion": newDepPlanBuildNum,
"versionId": projectId
}
# === Send PUT request ===
url = f"{base_url}/datamanagement/a/releasecandidates/{depPlanId}"
response = requests.put(url, json=payload, headers=headers, timeout=10)
# === Handle response ===
if response.status_code == 200:
print("Deployment plan updated successfully.")
print(f"Status: {response.status_code}")
else:
print(f"Failed to update deployment plan. Status: {response.status_code}")
print("Error:", response.text)
The code requires project id. To find it, first find the application id using Swagger UI: GET /api/{versionId}/applications. Then use Swagger UI: GET /api/{versionId}/applications/{appId}/projects to find the project id.
The code also requires the deployment plan id. It can be found by querying rc_release_candidate table in the database (column name: id).