Get Attachment Details by Incident ID
Use this API to retrieve details about all attachments present in the Junos Space Service Now database for an incident.
URI
https://[host]/api/juniper/servicenow/incident-management/incidents/{id}/attachments (HTTP method = GET)
URI Parameters
Parameter | Type | Required | Description |
---|---|---|---|
id | Integer | Yes | ID of the Incident for which details about attachments are to be retrieved |
Consumes
None
Produces
- application/vnd.juniper.servicenow.incident-management.attachments+xml;version=1
- application/vnd.juniper.servicenow.incident-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/incident-management/incidents/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
{ "attachment":{ "uri":"/api/juniper/servicenow/incident-management/incidents/3572214/attachments", "id":3572200, "attachmentName":"ex-4200-sn3-20151012-212450478_1179650_attach_shd_xml", "command":"show chassis hardware", "size":"394", "readStatus":"2", "readFailReason":" ", "uploadStatus": 0, "deviceFileType":"chassis” }, { "id":3572202, "attachmentName":"ex-4200-sn3-20151012-212450483_1179650_attach_rsi", "command":"request support information", "size":"81076", "readStatus":"2", "readFailReason":" ", "uploadStatus": 0, "deviceFileType":"RSI” } }