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 Attachment Details by Device Snapshot ID

    Use this API to retrieve attachments uploaded for a specific device snapshot.

    URI

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

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the device snapshot for which attachments are to be downloaded

    Consumes

    None

    Produces

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

    Response Elements

    Element

    Type

    Description

    attachments

    String

    Link to the collection of attachments present for an incident

    attachment

    String

    An attachment in the collection

    uri

    String

    URI of the attachment

    id

    Integer

    ID of the attachment

    attachmentName

    String

    Name of the attachment

    command

    String

    show command of Junos OS

    The attachment file contains the output of this show command.

    size

    Integer

    Size of the attachment in bytes

    readStatus

    String

    Status of reading the attachment from the device

    Possible values—Success and Failure:

    readFailReason

    String

    Reason why Service Now could not read the attachment

    uploadStatus

    String

    Status of uploading the attachment to Juniper Support System (JSS)

    Possible values—Uploaded and Not Uploaded

    deviceFileType

    String

    Type of file

    Possible values—config, version, chassis, RSI, ESI, status, and log

    Sample Output

    Sample XML Output

    <attachments uri="/api/juniper/servicenow/devicesnapshot-management/ devicesnapshots/3572214/attachments">
    <attachment id="3572200">
    <attachmentName>
    ex-4200-sn3-20151012-212450478_1179650_attach_shd_xml
    </attachmentName>
    <command>show chassis hardware</command>
    <size>394</size>
    <readStatus>2</readStatus>
    <readFailReason/>
    <uploadStatus>0</uploadStatus>
    <deviceFileType>chassis</deviceFileType>
    </attachment>
    <attachment id="3572202">
    <attachmentName>ex-4200-sn3-20151012-212450483_1179650_attach_rsi</attachmentName>
    <command>request support information</command>
    <size>81076</size>
    <readStatus>2</readStatus>
    <readFailReason/>
    <uploadStatus>0</uploadStatus>
    <deviceFileType>RSI</deviceFileType>
    </<attachments>
    

    Sample JSON Output

    Modified: 2016-12-06