Operation /model/renameModel
returns a success message ("success": true
and "ecode": "0"
) even though it failed to rename a model
When deployed as part of the ADOxxWeb API the /model/renameModel
operation returns a success message even though the model has not been renamed.
Example:
The models before executing the operation:
The ID of the model aNewName
is 91201
in this case.
Inputs:
-
modelID
:91201
-
newName
:something 2025.09.17 11:19:27
- Full POST URL:
http://localhost:8080/ADOxxWEBAPI/services/rest/model/renameModel?modelID=91201&newName=something 2025.09.17 11:19:27
Response:
{
"success": true,
"startDate": "24.09.2025,11:46:28",
"endDate": "24.09.2025,11:46:28",
"script": "CC \"Core\" UPDATE_MODEL_LIST \r\nCC \"Core\" LOAD_MODEL modelid:(91201) \nCC \"Core\" RENAME_MODEL modelid:(91201) basename:\"something 2025.09.17 11:19:27\" version:\"\" \r\nCC \"Core\" DISCARD_MODEL modelid:(91201) \n\r\nSET adowsresponse:(ecode)",
"duration": 114,
"ecode": "0",
"errorText": "No error",
"result": null
}
The model with the ID 91201
has the name aNewName
, so executing the operation would try to change its name to something 2025.09.17 11:19:27
. However, a model with the name something
and the version 2025.09.17 11:19:27
already exists.
The models after executing the operation:
When executing "Core" RENAME_MODEL
in the modelling toolkit it fails and provides the correct error: