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

    Export all Devices

    Use this API to export information such as the hostname, serial number and so forth about devices managed by Junos Space to a Microsoft Excel or comma-separated view (CSV) file.

    URI

    https://[host]/api/juniper/servicenow/device-management/devices/exportDevice? type={type} (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    devices

    String

    No

    Exports information about only the specified devices. If no devices are specified, exports information about all the discovered devices.

    type

    String

    No

    Defines the output format.

    Valid options—excel and csv. If type is not defined, the output is generated as a Microsoft Excel file.

    Consumes

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

    Request Elements

    Produces

    application/octet-stream

    Response

    The response is an Octet-Stream and the file is downloaded in either Excel or CSV format.

    Sample Input

    Sample XML Input

    To export information about specified devices:
    <export>
         <devices>
              <device uri="/api/juniper/servicenow/device-management/devices/622592"/>
              <device uri="/api/juniper/servicenow/device-management/devices/622593"/>
         </devices>
    </export>
    
    To export information about all the discovered devices:
    <export>
    </export>

    Sample JSON Input

    To export information about specified devices:
    "export":{
            "devices":{
                "device":[
                    {
                        uri:'/api/juniper/servicenow/device-management/devices/622592'
                    },
                    {
                        uri:'/api/juniper/servicenow/device-management/devices/622593'
                    }
                ]
            }
        }
    
    
    
    To export information about all the discovered devices:
    {
    "export":{
    	}
    }
    

    Response Status Code

    Message

    Description

    404 Not Found

    Invalid device ID.

    400 Bad Request

    Invalid type specified. The type element must be Excel or CSV.

    Modified: 2016-08-11