Introduced in QPR 8.1
Deletes folders, models, and branches from the server. This command can be used to delete specific model version as well as empty branches and folders.
PGApplication.Delete(ServerModelPath | ServerModelId | ServerFolderId, Operation, Parameters)
ServerModelPath: String. Defines the full path to server model or server folder. |
ServerModelId: Id. Defines ID of server model or model version. |
ServerFolderId: Id. Defines the ID of server folder or branch.
Operation: String. Defines the delete operation. Supported operations:
|•||DeleteModel: String. Delete the server model specified by ID or server path. If model has version control enabled and path/ID refers to the root of the model, then all versions and branches are deleted. Model ID can refer also to a specific model version that is deleted by this operation (see also the DeleteVersion operation).|
|•||DeleteTemplate: String. Delete server template specified by ID or server path.|
|•||DeleteVersion: String. Delete model version specified by ID or server path + optional version info parameters. Details of deleted version can be defined with version info parameters . If the given server model path or ID refers to some version of model, version info parameters can be used to refer to all versions and branches. Supported parameters: Model.Version, Model.Revision, Model.Branch.|
|•||DeleteBranch: String. Delete model version branch specified by ID or server path + version info parameters. Details of deleted branch must be defined with version info parameters . If the given server model path or ID refers to some version of model, version info parameters can be used to refer to all versions and branches. If parameter "DeleteContent=true" is used, then all model versions under the branch are also deleted. Supported parameters: DeleteContent, Model.Branch.|
|•||DeleteFolder: String. Delete server folder specified by ID or server path. If parameter "DeleteContent=true" is used, then all models and folders under the folder are also deleted. Supported parameters: DeleteContent.|
Parameters: String. A semicolon-separated list of parameters for the operation:
|•||Model.Version: String. Defines the model version that is deleted. If also Model.Branch is defined, the version is searched from that branch only.|
|•||Model.Revision: Integer. Defines the model revision that is deleted. If this is used, Model.Version and Model.Branch parameters are ignored (Model.Revision is always unique).|
|•||Model.Branch: String. Defines the name of the branch that is deleted.|
|•||DeleteContent: true | false. If this is true, all models and model version under the branch or folder are deleted. When this is false, a branch or a folder is deleted only if it is empty.|
Administrator or folder/model administrator depending on what is deleted.
Below are listed the return values that this function can return:
iResult = PGApplication.Delete("\\Temp Folder", "DeleteFolder", "DeleteContent=true")