Try OpenEdge Now
skip to main content
Administration
Command and Utility Reference : Deleting a REST Web application's files
 

Deleting a REST Web application's files

You can also use the RESTMAN republish command to delete files from a REST Web application's instance on the Web server.
To delete specific files from the REST Web application, the ZIP file (whose name you specify in the RESTMAN republish command) must consist of a versionInfo.json file inside the WEB-INF directory that has the information about the files you want to delete. Therefore, you must create and add a versionInfo.json file in which you specify the files that you want to delete from the REST Web application. The following is a sample versionInfo.json file that lists REST Web application files to be deleted:
{
"version": "03.18.2013:12:11:15"

"deleted": ["MyApp/", "MyApp/static", "MyApp/static/auth",
"MyApp/static/auth/error404.html"]
}
In this sample, the file, error404.html, is deleted from the REST Web application's instance on the Web server.
Although, versionInfo.json is not essential when publishing a new or an existing file on the Web server, if you want to simultaneously add, update, and delete files of your REST Web application, then you must include the relevant instructions in the versionInfo.json file as shown in the following sample:
{
"version": "03.18.2013:12:11:15"

"updated":["MyApp/", "MyApp/WEB-INF/", "MyApp/WEB-INF/adapters",
"MyApp/WEB-INF/adapters/MyApp.paar","MyApp/WEB-INF/adapters/runtime.props"],
"added":["MyApp/", "MyApp/static", "MyApp/static/auth",
"MyApp/static/auth/error402.html", "MyApp/static/auth/error500.html"],
"deleted": ["MyApp/", "MyApp/static", "MyApp/static/auth",
"MyApp/static/auth/error404.html"]
}
In this sample, the MyApp.paar and runtime.props files are updated, the error402.html and error500.html files are added, and the error404.html file is deleted from the REST Web application's instance on the Web server.