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=4;charset=UTF-8
    • application/vnd.juniper.servicenow.device-management.ondemandincident+json;version=4;charset=UTF-8

    Accept Header

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

    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

    Produces

    None

    Response Elements

    Element

    Type

    Description

    href

    String

    Link to the create on-demand incident job

    id

    Integer

    ID of the create on-demand incident job

    Sample Input

    Sample XML Input

    <ondemandincident>
    	<devices>
    		<device uri="/api/juniper/servicenow/device-management/devices/65552"/>
    	</devices>
    	<followUpMethod>Email Full Text Update</followUpMethod>
    	<caseCCList>
    		<email>npatnaik@juniper.net</email>
    	</caseCCList>
    	<priority>Critical</priority>
    	<synopsisComments>
    		These are my synopsis comments here
    	</synopsisComments>
    	<customerComments>
    		These are my customer comments here
    	</customerComments>
    	<createCase>false</createCase>
    	<collectLogFiles>true</collectLogFiles>
    	<verifyCPUUsage>true</verifyCPUUsage>
    	<useOffBoxJMBProcessing>true</useOffBoxJMBProcessing>
    </ondemandincident>
    
    

    Sample JSON Input

    {
    "ondemandincident":{
    "devices":{
    "device":[
    {
    "@uri":"/api/juniper/servicenow/device-management/devices/65546"
    },
    ]
    },
    "followUpMethod":"Email Full Text Update",
    "caseCCList":{
    "email":[
    "npatnaik@juniper.net"
    ]
    },
    "priority":"High",
    "synopsisComments":"This is a Test case, please ignore",
    "customerComments":"This is a Test case, please ignore",
    “createCase”: "true",
    "collectLogFiles": "false",
    "verifyCPUUsage": "false",
    "useOffBoxJMBProcessing": "true"
    }
    }

    Sample Output

    Sample XML Output

    <task href="/api/juniper/job-management/jobs/3801101">
    <id>3801101</id>
    </task>
    

    Sample JSON Output

    {
       "task":{
          "@href":"/api/space/job-management/jobs/3801101",
          "id":3801101
       }
    }
    

    Error Codess

    Message

    Description

    400 Bad Request

    • An on-demand incident cannot be created if more than five devices are selected.
    • 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.

    404 Not Found

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

    Modified: 2016-08-11