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 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:

    • Event—indicates that an event is detected on the Service Now managed devices.
    • On-demand—Indicates that the incident created is an on-demand incident.
    • Event-RMA—indicates that an RMA event is detected on the Service Now managed devices.
    • Event (low end)—indicates that the JMB generated on a device is a low impact JMB. User can manually collect troubleshooting data and update case through Case Manager or Service Now.
    • On-demand RMA—Indicates that the RMA event detected on the device is an on-demand event.
    • AIS Health Check—Indicates the incident is created in response to a JMB collected to obtain information about AI-Scripts error.

    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:

    • Not Submitted—Incident is not submitted to Juniper Support System (JSS)
    • Submitted—Incident is submitted to JSS
    • Created—A case is created for the incident and an ID is assigned to the case in JSS
    • Updated—The case ID of the incident is updated in JSS
    • Create Failed—A case could not be created in JSS for the incident
    • Closed—The case is closed in JSS
    • Submission Failed—The incident could not be submitted to JSS for creating a case

    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.

    Modified: 2016-08-11