Related Documentation
- Junos Space
- Get an Incident by Incident ID
- Get Incident by Customer Tracking Number
- Delete an Incident by Incident ID
- Export a JMB in the HTML or XML Format
- Save a Case
- Submit a Case
- Assign an Owner to an incident
- Flag an Incident to Users
- Export the Summary of an Incident to Excel
- Create a Case for an End-Customer Incident
- Upload Core Files for an Incident
- Download all Attachments of an Incident
- Download Log Files and JMB of an Incident
- Upload Attachment to Incident by Using SCP
- Upload Attachment to Incident by Using HTTP
- Incident Management REST API Overview
Get All Incidents in Service Now
Use this API to retrieve all incidents in Junos Space Service Now chronologically by organization name and device group.
URI
https://[host]/api/juniper/servicenow/incident-management/incidents (HTTP method = GET)
URI Parameters
None.
Consumes
None
Produces
- application/vnd.juniper.servicenow.incident-management.incidents+xml;version=3
- application/vnd.juniper.servicenow.incident-management.incidents+json;version=3
Response
Element | Type | Description |
---|---|---|
uri | String | URI to the collection of incidents in Service Now |
size | Integer | Number of records in the collection |
incident | incident | An incident in the collection |
href | String | Link to the incident |
uri | String | URI of the incident |
key | Integer | ID of the incident |
organizationName | String | Name of the organization to which this incident is assigned |
organizationID | Integer | ID of the organizaiton associated with the incident |
deviceGroupName | String | Name of the device group to which this incident is assigned |
deviceGroupID | Integer | Device group ID |
priority | String | Incident priority |
defectType | String | Type of defect on the event that triggered this incident |
incidentType | String | Type of event for which the incident was generated Possible values:
|
hostName | String | Hostname of the device with which the incident is associated |
deviceId | ID of the device with which the incident is associated | |
product | String | Product type of the device on which this incident occurred |
status | String | Status of the Incident The possible values are:
|
customerTrackingNumber | String | Number provided for tracking the case created in JSS for the incident. |
occurred | String | Date and time the incident was reported |
prbIdentifier | String | ID of the event that occurred on the device |
Output
Example XML Output
<incidents uri="/api/juniper/servicenow/incident-management/incidents/" size="8"> <incident href="/api/juniper/servicenow/incident-management/incidents/6914085" uri="/api/juniper/servicenow/incident-management/incidents/6914085" key="6914085"> <organizationName>test</organizationName> <organizationId>198879</organizationId> <deviceGroupName>Default for test</deviceGroupName> <deviceGroupId>4325412</deviceGroupId> <priority>Low</priority> <defectType>Process error</defectType> <incidentType>Event</incidentType> <hostName>mx-480-sn1</hostName> <deviceId>4325412</deviceId> <product>MX480</product> <status>Created, 2014-0505-4613</status> <prbIdentifier>mx-480-sn1-305-20140505-030056-305</prbIdentifier> <occured>2014-05-05 15:30:56 IST</occured> </incident> <incident href="/api/juniper/servicenow/incident-management/incidents/6357012" uri="/api/juniper/servicenow/incident-management/incidents/6357012" key="6357012"> <organizationName>test</organizationName> <organizationId>198879</organizationId> <deviceGroupName>Default for test</deviceGroupName> <deviceGroupId>4325412</deviceGroupId> <priority>Low</priority> <defectType>FRU error</defectType> <incidentType>Event</incidentType> <hostName>mx-480-sn1</hostName> <deviceId>4325412</deviceId> <product>MX480</product> <status>Created, 2014-0430-4576</status> <prbIdentifier>mx-480-sn1-394-20140430-025529-394</prbIdentifier> <occured>2014-04-30 15:25:29 IST</occured> </incident> <incident href="/api/juniper/servicenow/incident-management/incidents/6325115" uri="/api/juniper/servicenow/incident-management/incidents/6325115" key="6325115"> <organizationName>test</organizationName> <organizationId>198879</organizationId> <deviceGroupName>Default for test</deviceGroupName> <deviceGroupId>4325412</deviceGroupId> <priority>Low</priority> <defectType /> <incidentType>On-demand</incidentType> <hostName>mx-480-sn1</hostName> <deviceId>4325412</deviceId> <product>MX480</product> <status>Initial</status> <prbIdentifier>mx-480-sn1-999-20140429-144015-999</prbIdentifier> <occured>2014-04-30 03:10:15 IST</occured> </incident> <incident href="/api/juniper/servicenow/incident-management/incidents/4620337" uri="/api/juniper/servicenow/incident-management/incidents/4620337" key="4620337"> <organizationName>test</organizationName> <organizationId>198879</organizationId> <deviceGroupName>Default for test</deviceGroupName> <deviceGroupId>4325412</deviceGroupId> <priority>Low</priority> <defectType /> <incidentType>On-demand</incidentType> <hostName>mx-480-sn1</hostName> <deviceId>4325412</deviceId> <product>MX480</product> <status>Submitted</status> <prbIdentifier>mx-480-sn1-999-20140423-230239-999</prbIdentifier> <messages> <errorMessages> <errorMessage> <message>Error from JSS</message> </errorMessage> </errorMessages> </messages> <occured>2014-04-24 11:32:39 IST</occured> </incident> </incidents>
Example JSON Output
{ "incidents": { "@uri": "/api/juniper/servicenow/incident-management/incidents/", "@size": "8", "incident": [ { "@href": "/api/juniper/servicenow/incident-management/incidents/6914085", "@uri": "/api/juniper/servicenow/incident-management/incidents/6914085", "@key": "6914085", "organizationName": "test", "organizationId": 198879, "deviceGroupName": "Default for test", "deviceGroupId": 4325412, "priority": "Low", "defectType": "Process error", "incidentType": "Event", "hostName": "mx-480-sn1", "deviceId": 4325412, "product": "MX480", "status": "Created, 2014-0505-4613", "prbIdentifier": "mx-480-sn1-305-20140505-030056-305", "occured": "2014-05-05 15:30:56 IST" }, { "@href": "/api/juniper/servicenow/incident-management/incidents/4620337", "@uri": "/api/juniper/servicenow/incident-management/incidents/4620337", "@key": "4620337", "organizationName": "test", "organizationId": 198879, "deviceGroupName": "Default for test", "deviceGroupId": 4325412, "priority": "Low", "defectType": "", "incidentType": "On-demand", "hostName": "mx-480-sn1", "deviceId": 4325412, "product": "MX480", "status": "Submitted", "prbIdentifier": "mx-480-sn1-999-20140423-230239-999", "messages": { "errorMessages": { "errorMessage": { "message": "Error from JSS" } } }, "occured": "2014-04-24 11:32:39 IST" } ] } }
Response Status Code
Message | Description |
---|---|
204 No Content | No incidents found. |
Related Documentation
- Junos Space
- Get an Incident by Incident ID
- Get Incident by Customer Tracking Number
- Delete an Incident by Incident ID
- Export a JMB in the HTML or XML Format
- Save a Case
- Submit a Case
- Assign an Owner to an incident
- Flag an Incident to Users
- Export the Summary of an Incident to Excel
- Create a Case for an End-Customer Incident
- Upload Core Files for an Incident
- Download all Attachments of an Incident
- Download Log Files and JMB of an Incident
- Upload Attachment to Incident by Using SCP
- Upload Attachment to Incident by Using HTTP
- Incident Management REST API Overview