Information
Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

File adapter requests and responses for an append action


The append action can be performed on TEXT files. All the elements in the request must be defined to append the file. In the sample, the <lines> element is required. 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 following figure shows an XML template for the File adapter request with append action.

XML template of the File adapter request with append action


<fileRequest>
 <filename></filename>
 <character-set></character-set>
 <lines>
   <line>data to be written</line>
...
 </lines>
</fileRequest>

The following table describes the elements of a File adapter request with append action.

 Elements of a File adapter request with append action

The following figure shows a sample adapter request for the File adapter with append action.

XML sample of the File adapter request with append action


<fileRequest>
 <filename>/tmp/appendfile.txt</filename>
 <character-set>Shift_JIS</character-set>
 <lines>
   <line>data to be written</line>
...
 </lines>
</fileRequest>

 

Warning

Note

If the specified file does not exist, the file is created, and the request appends the data in the <lines> element to the newly created file.

The append action request for a File adapter returns an adapter response that contains the summary information for the request. A detailed output is not returned for this action. The following table describes the elements of a File adapter response to a request with append action.

 Elements of a File adapter response to a request with append action

The following figure illustrates an XML sample of the File adapter response to a request with append action.

XM L sample of the File adapter response to a request with append 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>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

(archive) BMC Atrium Orchestrator Content 20.13.01