File adapter request and response for a delete action
When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data>
elements. However, when you create a static request, <request-data>
is not required and the adapter request starts with the <adapterName-adapter-request>
element.
The Delete action can be performed on any file. The absolute path of the file is required to delete a file through the Delete adapter request.
The following table describes the elements of an adapter request for the File adapter with a delete action.
Element of an adapter request for the File adapter with a delete action
Element | Description | Required |
---|---|---|
| Specifies the absolute path and file name of the file to be deleted You can delete a file only it it already exists or you have the permission to delete it. | Yes |
The following figure shows a sample adapter request for the File adapter with a delete action.
XML sample of the File adapter request with a delete action
<fileRequest>
<filename>/tmp/filetodelete.txt</filename>
</fileRequest>
The delete action for the File adapter request returns an adapter response containing the summary information for the request. A detailed output is not returned for this action.
The following figure describes the elements of a File adapter response to a request with a delete action.
Elements of a File adapter response to a request with a delete action
Element | Description |
---|---|
| Contains the |
| Specifies the status of the adapter request |
| Specifies the error message returned, if the value of the |
| Specifies the duration of the command execution, in milliseconds |
| Returns an empty element No detailed output is returned for a delete action. |
The following figure illustrates a sample XML for the File adapter response to a request with a delete action.
XML sample of the File adapter response to a request with a delete action
<file-output>
<metadata>
<status>success or error</status>
<error>Present only with status of 'error'</error>
<execution-milliseconds>value</execution-milliseconds>
</metadata>
<output/>
</file-output>
Comments
Log in or register to comment.