Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Check FTP Server for a Device

    Use this API to check availability of an FTP server for a Service Now device to upload core files.

    URI

    https://[host]/api/juniper/servicenow/device-management/checkFTPServer (HTTP method = POST)

    Consumes

    • application/vnd.juniper.servicenow.device-management.devices. checkFTPServer+xml;version=1;charset=UTF-8
    • application/vnd.juniper.servicenow.device-management.devices. checkFTPServer+json;version=1;charset=UTF-8

    Request Elements

    Element

    Type

    Description

    devices

    device

    Collection of devices for which FTP server availability is to be checked

    device

    device

    A device for which FTP server availability is to be checked

    uri

    String

    URI of the device

    href

    String

    Link to the device

    Produces

    • application/vnd.juniper.servicenow.task-management.task+json;version=1
    • application/vnd.juniper.servicenow.task-management.task+xml;version=1

    Response Elements

    Element

    Type

    Description

    href

    String

    Link to the job for checking availability of FTP server

    id

    Integer

    ID of the job

    Sample Input

    Sample XML Input

    <checkFTPServer>
    	<devices>
    		<device href="/api/juniper/servicenow/device-management/devices/98890" uri="/api/juniper/servicenow/device-management/devices/98890" />
    		<device href="/api/juniper/servicenow/device-management/devices/98891" uri="/api/juniper/servicenow/device-management/devices/98891" />
    	</devices>
    </checkFTPServer>
    

    Sample JSON Input

    {  
       "checkFTPServer":{  
          "devices":{  
             "device":[  
                {  
                   "href":"/api/juniper/servicenow/device-management/devices/98890",
                   "uri":"/api/juniper/servicenow/device-management/devices/98890"
                },
                {  
                   "href":"/api/juniper/servicenow/device-management/devices/98891",
                   "uri":"/api/juniper/servicenow/device-management/devices/98891"
                }
             ]
          }
       }
    }
    
    

    Sample Output

    Sample XML Output

    <task href="/api/space/job-management/jobs/3473408">
    	<id>3473408</id>
    </task>
    

    Sample JSON Output

    {  
       "task":{  
          "id":"3473408",
          "href":"/api/space/job-management/jobs/3473408"
       }
    }
    

    The API outputs a URL to the job details in its response. The following is a sample of the job details in XML format:

    Sample Job Details in XML Format

    <job uri="/api/space/job-management/jobs/3473411" href= "/api/space/job-management/jobs/3473411" >
    <id>3473411</id>
    <name>FTP Server Accessibility-3473411</name>
    <job-type>FTP Server Accessibility</job-type>
    <detail-link href= "/api/juniper/servicenow/device-management/devices/job-instances/3473411 /FTPServerAccessibilityJobResults" type="vnd.juniper.servicenow.device-management.devices.FTPServerAccessibilityJobResults">
    <name>
    /api/juniper/servicenow/device-management/devices/job-instances /3473411 /FTPServerAccessibilityJobResults
    </name>
    </detail-link>
    <job-state>DONE</job-state>
    <job-status>FAILURE</job-status>
    <percent-complete>100.0</percent-complete>
    <scheduled-start-time>Thu, 03 Dec 2015 04:34:02 IST</scheduled-start-time>
    <start-time>Thu, 03 Dec 2015 04:34:02 IST</start-time>
    <end-time>Thu, 03 Dec 2015 04:34:04 IST</end-time>
    <owner>super</owner>
    <summary>
    Total Files: 2<br>Successful Files: 0<br>Failed Files: 2<br>
    </summary>
    <supports-recurrence>false</supports-recurrence>
    <schedule-string/>
    <domain-name>Global</domain-name>
    <domain-id>2</domain-id>
    <domain href= "/api/space/domain-management/domains/2" />
    <cancel href= "/api/space/job-management/jobs/3473411/cancel" />
    <progress-update href= "/api/space/job-management/jobs/3473411/progress-update" />
    <reschedule-job href= "/api/space/job-management/jobs/3473411/reschedule-job" />
    </job>
    

    The detail-link element provides details of the job executed on multiple devices for checking accessibility of the FTP server. The following is a sample of the details of the job result in XML format:

    <ftpServerAccessibilityJobResult uri="/api/juniper/servicenow/device-management/devices/job-instances/3473411  /FTPServerAccessibilityJobResults/622594" jobHref="/api/space/job-management/jobs/3473411" key="622594">
    <device>ex-2200-sn2</device>
    <ftpServer>192.0.2.134</ftpServer>
    <status>FAILED</status>
    <reason>Router is not able to access the FTP server.</reason>
    </ftpServerAccessibilityJobResult>
    

    Modified: 2016-08-11