Delete persisted user or application data

You can use this operation to remove data that is persisted for a specific user or application.

HTTP method and URI path

DELETE /zosmf/IzuUICommon/persistence/user/<pluginId>/<taskId>/<resourcePath>
DELETE /zosmf/IzuUICommon/persistence/app/<pluginId>/<taskId>/<resourcePath>
where:
  • zosmf/IzuUICommon/persistence identifies the data persistence services.
  • user indicates that the service will delete data that has been persisted for the user who is logged into z/OSMF when the service is invoked.
  • app indicates that the service will delete data that has been persisted globally for the application.
  • <pluginId> is the unique identifier you assigned to the plug-in.
  • <taskId> is the unique identifier you assigned to the task.
  • <resourcePath> is the path in the JSON object to the data to be deleted. The persisted data is stored in a JSON object using a tree structure. To delete persisted data, specify all the nodes or branches that must be traversed in the JSON structure to access that data. Use a forward slash (/) to separate each node or branch, and specify the nodes in the order in which they are listed in the structure.

    For example, to delete the data persisted for the history attribute shown in the sample JSON object in Figure 1, specify the following resource path: /SETTINGS/history/. In which case, the value for the acct, proc, rsize, and ugrp attributes will be deleted. To delete the value for only the rsize attribute, specify the following resource path: /SETTINGS/history/rsize/.

    Figure 1. Sample JSON structure for persisted data
    {
       "private": {
          "created": "2013-07-09T02:52:47.921Z",
          "majorv": 0,
          "minorv": 0,
          "modified": "2014-01-13T15:01:39.409Z"
       },
       "public": {
          "SETTINGS": {
             "authorization": {
                "auth": true
             },
             "history": {
                "acct": [
                   "OMVS0803"
                ],
                "proc": [
                   "CEANNKJ"
                ],
                "rsize": [
                   "50000"
                ],
                "ugrp": [
                   "ZOSMFGRP"
                ]
             },
             "trace": {
                "init": false,
                "task": false
             }
          }
       }
    }

Standard headers

Use the following standard HTTP header with this request:

Content-Type: application/json

Custom headers

None.

Request content

None.

Required authorizations

See Required authorizations.

Expected response

On completion, the service returns an HTTP response, which includes a status code indicating whether your request completed. Status code 200 indicates success. A status code of 4nn or 5nn indicates that an error has occurred. For more details, see Error handling.

The response also includes the updated JSON object. For more details, see Content type used for HTTP request and response data.

Example

To delete the persisted data that satisfies the following criteria, submit the request depicted in Figure 2:
  • The data was persisted for a task with the ID MYTASK that resides in plug-in com.ibm.zoszmf.myapp.
  • The data was persisted for the user who is currently logged into z/OSMF.
  • The JSON object that contains the data uses the structure provided in Figure 1.
  • The data persisted for the history attribute is to be deleted.
Figure 2. Sample request to delete persisted data
DELETE /zosmf/IzuUICommon/persistence/user/com.ibm.zoszmf.myapp/MYTASK/SETTINGS/history HTTP/1.1
Host: zosmf1.yourco.com
A sample response is shown in Figure 3.
Figure 3. Sample response from a request to delete persisted data
HTTP/1.1 200 OK
Date: Thu, 13 Jan 2011 05:39:28 +0000GMT
Connection: close

{
"version" : "1.0.0”,
"value":{
		"authorization":{"auth":true},
		"history":null,
		"trace":{"init":false,"task":false}
 }
}