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

    Get Device Snapshot Information by Device ID

    Service Now periodically collects device snapshots or iJMBs that contain information about devices. These iJMBs are processed and displayed on the Device Snapshot page of the Service Now application.

    You can use thie API to view the iJMB information about a specific device.

    URI

    https://[host]/api/juniper/servicenow/devicesnapshot-management/devicesnapshots/{id} (HTTP metod = GET)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the device for which device snapshots are to be viewed

    Consumes

    None

    Produces

    • application/vnd.juniper.servicenow.devicesnapshot-management.devicesnapshot +xml;version=2
    • application/vnd.juniper.servicenow.devicesnapshot-management.devicesnapshot +json;version=2

    Response

    Element

    Type

    Description

    uri

    String

    URI of the device snapshot

    id

    Integer

    ID of the device snapshot

    status

    String

    Status of uploading the iJMB to Juniper Support System (JSS) or Service Now partner (if operating in Partner Proxy mode

    Possible values:

    • Uploaded—The iJMB is uploaded
    • In Progress—The iJMB is in the process of being uploaded
    • Not Submitted—The iJMB is not yet uploaded
    • Skipped—Upload of iJMB to JSS or Service Now partner is skipped
    • Failed—The iJMB failed to be uploaded

    siteId

    Integer

    ID of the site with which the device is associated

    filterLevel

    String

    Filter applied to JMB before sending to JSS.

    Possible Values:

    • Do not send—Device configuration information is not sent.
    • Send all information except configuration—All device information except the configuration information is sent.
    • Send all information with IP Addresses overwritten—Device information is sent with IP addresses overwritten by asterisk (*).
    • Send all information—All information retrieved from a device is sent to JSS as is.
    • Only send list of features used—Only the device configuration information is sent.

    organizationName

    String

    Organization with which the device is associated

    deviceGroupName

    String

    Name of the device group with which the device is associated

    prbIdentifier

    String

    ID of the event for generating the device snapshot

    device

    device

    Device from which the device snapshot was collected

    href

    String

    Link to the device

    id

    Integer

    ID of the device

    serialNumber

    String

    Serial number of the device

    ipAddr

    String

    Device IP address

    product

    String

    Device product name

    platform

    String

    Device platform

    hostName

    String

    Device hostname

    release

    String

    Release number of software currently installed on the device

    version

    String

    Release version of software currently installed on the device

    Sample Output

    Sample XML Output

    <devicesnapshot uri="/api/juniper/servicenow/devicesnapshot-management/devicesnapshots/196618">
           <id>196618</id>
           <status>Initial(Not submitted:  Filter”;Do not send Device Snapshots”; is selected)</status>
           <siteId>CJ18841</siteId>
           <filterLevel>Do not send</filterLevel>
           <organizationName>k</organizationName>
           <deviceGroupName>k</deviceGroupName>
           <prbIdentifier>SN-SRX1400test-BH4610AA0024-20120329-111202-999</prbIdentifier>
           <device href="/api/juniper/servicenow/device-management/devices/196610">
                  <id>196610</id>
                  <serialNumber>BH4610AA0024</serialNumber>
                  <ipAddr>192.0.2.11</ipAddr>
                  <product>SRX1400</product>
                  <platform>junos-es</platform>
                  <hostName>SN-SRX1400test</hostName>
                  <release>10.4</release>
                  <version>R7</version>
           </device>
    </devicesnapshot>
    
    

    Sample JSON Output

    {
    "devicesnapshot":
          {
                "@uri":"/api/juniper/servicenow/devicesnapshot-management/devicesnapshots/196618",
                "id":196618,
                "status":"Initial(Not submitted:  Filter \"Do not send Device Snapshots\" is selected)",
                "siteId":"CJ18841",
                "filterLevel":"Do not send",
                "organizationName":"k",
                "deviceGroupName":"k",
                "prbIdentifier":"SN-SRX1400test-BH4610AA0024-20120329-111202-999",
                "device":
                {
                      "@href":"/api/juniper/servicenow/device-management/devices/196610",
                      "id":196610,"serialNumber":"BH4610AA0024",
                      "ipAddr":"192.0.2.11",
                      "product":"SRX1400",
                      "platform":"junos-es",
                      "hostName":"SN-SRX1400test",
                      "release":10.4,
                      "version":"R7"
                }
          }
    }
    
    

    Additional Notes

    To get the device snapshot for specific device, you can use the filter parameter. For example, the following URI retrieves the device snapshot for the SN-SRX1400test device.

    https://[host]/api/juniper/servicenow/devicesnapshot-management/devicesnapshots?filter=(hostName eq ' SN-SRX1400test') (HTTP method = GET)

    <devicesnapshots size="1" uri="/api/juniper/servicenow/devicesnapshot-management/devicesnapshots/">
          <devicesnapshot key="196618" uri="/api/juniper/servicenow/devicesnapshot-management/devicesnapshots/196618" 
    href="/api/juniper/servicenow/devicesnapshot-management/devicesnapshots/196618"> <hostName>SN-SRX1400test</hostName> <product>SRX1400</product> <status>Initial(Not submitted: Filter “Do not send Device Snapshots” is selected)</status> </devicesnapshot> </devicesnapshots>

    Response Status Code

    Message

    Description

    404 Not Found

    Invalid snapshot ID specified.

    Modified: 2017-07-19