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

    Install an Event Profile on a Device

    An event profile is a set of event scripts that are selected from an AI-Script bundle. When you install an event profile on Juniper Networks devices, the event scripts are installed on the devices and provide the information needed to automatically detect and report problem (incident) and information events, thus ensuring maximum network uptime. Service Now uses Device Management Interface (DMI) to install and uninstall AI-Scripts on devices. DMI is an extension to the NETCONF network management protocol.

    Use this API to install an event profile on a device.

    URI

    https://[host] /api/juniper/servicenow/device-management/devices/ {id} /installEventProfile?queue=http://[host]/api/hornet-q/queues/jms.queue.[QueueName] (HTTP method = POST)

    Consumes

    • application/vnd.juniper.servicenow.device-management.installeventprofile+xml;version=2; charset=UTF-8 for XML request
    • application/vnd.juniper.servicenow.device-management.installeventprofile+json;version=2; charset=UTF-8 for JSON request

    Request Elements

    Element

    Type

    Description

    eventprofile

    eventprofile

    Event profile to be installed

    href

    String

    Link to the event profile

    neverStoreScriptBundle

    Boolean

    Flag to store the script bundle on the device

    • true—A copy of the script bundle is not stored on the device
    • false—A copy of the script bundle is stored on the device

    removeScriptBundle

    Boolean

    Flag to remove script bundle from the device after the event profile is installed

    • true—Script bundle is removed from the device after the event profile is installed
    • false—Script bundle is retained on the device after the event profile is installed

    alterDeviceConfig

    Boolean

    Flag to modify the device configuration while committing the event profile on the device

    • true—Device configuration is modified while committing the event profile
    • false—Device configuration is not modified while committing the event profile

    Note: This element is applicable only while installing AI-Scripts 5.0 and later on a device for the first time.

    Produces

    • application/vnd.juniper.servicenow.device-management.device+xml;version=2 for XML requests
    • application/vnd.juniper.servicenow.device-management.device+json;version=2 for JSON requests

    Response Elements

    Element

    Type

    Description

    task

    task

    Install event profile job

    href

    String

    Link to the install event profile job

    id

    Integer

    Device unique identifier

    Sample Input

    Example XML Input

    <installeventprofile>
         <eventprofile href="/api/juniper/servicenow/event-profile-management/eventProfiles/163857" />
         <neverStoreScriptBundle>false</neverStoreScriptBundle>
         <removeScriptBundle>false</removeScriptBundle>
     	<alterDeviceConfig>false</alterDeviceConfig>
    </installeventprofile>
    

    Example JSON Input

    {
    	"installeventprofile": {
    		"eventprofile": { 
    			"@href": "/api/juniper/servicenow/event-profile-management/eventProfiles/197067" 
    			},
    		"neverStoreScriptBundle": "false",
    		"removeScriptBundle": "false",
    		”alterDeviceConfig”: “true”
    }
    }

    Sample Output

    Example XML Output

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

    Example JSON Output

    {  
      "task": {
        "href": "/api/juniper/job-management/jobs/2130040",
        "id": "2130040"
      }
    }

    Response Status Code

    Message

    Description

    404 Not Found

    Invalid address group ID.

    SN-1007

    Address type is not valid.

    SN-1000

    Invalid devices.

    Modified: 2016-08-11