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

    Create On-Demand Incident

    Use this API to generate Juniper Message Bundles (JMBs) without having to wait for events to occur on devices.

    URI

    https://[host]/api/juniper/servicenow/device-management/devices/ createOnDemandIncident?queue=http://[host]/api/hornet-q/queues /jms.queue.[queueName] (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    queueName

    String

    Yes

    Name of the create on-demand incident job queue

    Consumes

    • application/vnd.juniper.servicenow.device-management.ondemandincident +xml;version=6;charset=UTF-8
    • application/vnd.juniper.servicenow.device-management.ondemandincident +json;version=6;charset=UTF-8

    Request Elements

    Element

    Type

    Description

    devices

    device

    Collection of devices on which on-demand incident is to be generated

    device

    device

    A device on which on-demand incident is to be generated

    uri

    String

    Link to the device

    followUpMethod

    String

    Method used to follow up the case created for the on-demand incident

    Possible values:

    • EMAIL_FULL_TEXT_UPDATE
    • EMAIL_WEB_LINK
    • PHONE_CALL

    For an end-customer Service Now, a value need not be provided for followUpMethod. Any value, if provided, is discarded.

    caseCCList

    caseCCList

    Collection of e-mail ID of users to be notified about the on-demand incident

    email

    String

    E-mail ID of a user

    Priority

    Enum

    Priority of the on-demand incident

    Possible values:

    • Critical
    • High
    • Medium
    • Low

    synopsisComments

    String

    Synopsis of the on-demand incident

    customerComments

    String

    Comments from user for the on-demand incident

    createCase

    Boolean

    Flag to indicate whether the incident should be submitted to JSS or Service Now partner for creating a case

    Possible values:

    • true—The incident is submitted for creating a case
    • false—The incident is not submitted for creating a case

    collectLogFiles

    Boolean

    Flag to indicate whether or not log files should be collected for this on-demand incident

    Possible values:

    • true—Log files are collected for the on-demand incident
    • false—Log files are not collected for the on-demand incident

    verifyCPUUsage

    Boolean

    Flag to indicate whether or not usage of device CPU must be verified while generating this on-demand incident

    Possible values:

    • true—CPU usage is verified
    • false—CPU usage is not verified

    useOffBoxJMBProcessing

    String

    Flag to indicate whether the JMB for the on-demand incident should be created by using AI-Scripts or directive file

    Possible values:

    • true—Directive file is used for generating the JMB for the on-demand incident
    • false—AI-Scripts is used for generating the JMB for the on-demand incident

    associateCaseId

    String

    ID of the case with which the on-demand incident must be associated

    Produces

    • application/vnd.juniper.servicenow.device-management.ondemandincidentresult +xml;version=6
    • application/vnd.juniper.servicenow.device-management.ondemandincidentresult +json;version=6

    Response Elements

    Element

    Type

    Description

    IncidentDetailsList

    IncidentDetails

    Collection of on-demand incidents created

    IncidentDetails

    IncidentDetails

    Details of the on-demand incident

    IncidentId

    Integer

    ID of the on-demand incident

    DeviceId

    Integer

    ID of the device for which the on-demand incident was created

    DeviceName

    String

    Name of the device for which the on-demand incident was created

    Task

    Task

    Task for creating the on-demand incident

    id

    Integer

    ID of the task for creating the on-demand incident

    Sample Input

    Sample XML Input

    <ondemandincident>
    <devices>
    <device uri="/api/juniper/servicenow/device-management/devices/34751"/>
    </devices>
    <followUpMethod>Email Full Text Update</followUpMethod>
    <caseCCList>
    <email>srikk@juniper.net</email>
    </caseCCList>
    <priority>Low</priority>
    <problemSynopsis>
     Creating on Demand incident v6
    </problemSynopsis>
    <problemDescription>
    test
    </problemDescription>
    <createCase>false</createCase>
    <collectLogFiles>true</collectLogFiles>
    <verifyCPUUsage>false</verifyCPUUsage>
    <useOffBoxJMBProcessing>true</useOffBoxJMBProcessing>
    <associateCaseId>2017-0128-0013</associateCaseId>
    </ondemandincident>
    

    Sample JSON Input

    {
      "ondemandincident": {
        "devices": {
          "device": { "-uri": "/api/juniper/servicenow/device-management/devices/34751" }
        },
        "followUpMethod": "Email Full Text Update",
        "caseCCList": { "email": "srikk@juniper.net" },
        "priority": "Low",
        "problemSynopsis": "
     Creating on Demand incident v6
    ",
        "problemDescription": "
    test
    ",
        "createCase": "false",
        "collectLogFiles": "true",
        "verifyCPUUsage": "false",
        "useOffBoxJMBProcessing": "true",
        "associateCaseId": "2017-0128-0013"
      }
    }
    

    Sample Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <OnDemandIncidentProcessingResult>
    	<IncidentDetailsList>
    		<IncidentDetails>
    			<IncidentId>197325</IncidentId>
    			<DeviceId>34894</DeviceId>
    			<DeviceName>mx-480-sn</DeviceName>
    		</IncidentDetails>
    	</IncidentDetailsList>
    	<Task>
    		<id>753664</id>
    	</Task>
    </OnDemandIncidentProcessingResult>

    Sample JSON Output

    {
    	"OnDemandIncidentProcessingResult": {
    		"IncidentDetailsList": {
    			"IncidentDetails": {
    				"IncidentId": 198375,
    				"DeviceId": 34894,
    				"DeviceName": "mx-480-sn"
    			}
    		},
    		"Task": {
    			"id": 753666
    		}
    	}
    }
    

    Error Codess

    Message

    Description

    400 Bad Request

    • The device is not associated with any device group.
    • The device Is an end-customer device.
    • The device Is a fabric node (TOR).
    • The device Is a DCF device.
    • The follow-up method specified in the request is invalid.
    • The priority specified in the request is invalid.
    • The e-mail ID specified in the request is invalid.
    • The case ID provided for associating the incident refers to a closed case
    • The case ID provided for associating the incident refers to a case related to BIOS incidents.

    404 Not Found

    The device specified in the request is not a valid Service Now device.

    Modified: 2017-07-18