FTP adapter request and response for site command

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. 

BMC recommends that you do not include unused elements in the adapter configuration because they might cause errors. 

The following table describes the elements of an FTP adapter request with the site command.

Elements of an FTP adapter request with site command 

Element

Description

Required

<targets>

Contains the <target> elements

Conditional; required if a target is referenced or defined in the request

<target>

Contains the name attribute that references a configuration node from the adapter configuration, or contains the elements that define a dynamic target

If you do not provide the value, the default target in the adapter configuration is used.

Conditional; required if a target is referenced or defined in the request.

<host name>

Specifies the host name or the IP address of the remote host 

This input applies to a dynamic target.

Conditional; required if a dynamic target is used

<port>

Specifies the port on which the remote host listens 

This input applies to a dynamic target. 

Default value: 23

Conditional

<user name>

Specifies the user name to be used for remote host authentication

This input applies to a dynamic target.

Conditional; required if a dynamic target is used

<password>

Specifies the password that corresponds to the user name provided 

This input applies to a dynamic target.

Conditional; required if a dynamic target is used

<commands>

Contains the FTP command element

Yes

<site>Specifies the SITE command to be executed based on the target FTP SITEYes

The following figure shows an XML template of the adapter request for the FTP adapter with site command.

XML template of the FTP adapter request with site command

<ftp-request>
    <commands>
      <site>help</site>
    </commands>
</ftp-request>

The following figure shows an XML sample of the adapter request for the FTP adapter with site command.

XML sample of the FTP adapter request with site command

<ftp-command-output>
  <response-metadata>
    <status>success</status>
  </response-metadata>
  <targets-output>
    <target-output host="172.19.156.52">
      <target-metadata>
        <status>success</status>
      </target-metadata>
      <commands-output>
        <command-output>
          <metadata>
            <id>1</id>
            <command>site</command>
            <execution-milliseconds>54</execution-milliseconds>
            <status>success</status>
          </metadata>
          <output>
            <site>
              <line>214 CHMOD UMASK HELP</line>
            </site>
          </output>
        </command-output>
      </commands-output>
    </target-output>
  </targets-output>
</ftp-command-output>
Was this page helpful? Yes No Submitting... Thank you

Comments