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 Event Profile on Devices

    Use this API to install an event profile on a Juniper Networks device. The event scripts are installed on the devices and provide the information needed to automatically detect and report events, thus ensuring maximum network uptime.

    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 events. 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.

    URI

    https://[host]/api/juniper/servicenow/event-profile-management/eventProfiles /{id}/installEventProfile?queue=https://[host]/api/hornet-q/queues/jms.queue.[queuename] (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the event profile to be installed on devices .

    queuename

    String

    Yes

    Name of the install event profile job queue

    Consumes

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

    Request Elements

    Element

    Type

    Description

    neverstorescriptbundle

    Boolean

    Flag to specify whether or not to store the script bundle on the device. Valid values are true or false.

    Possible values:

    • true—Script bundle is not stored on the device
    • false—Script bundle is stored on the device

    removescriptbundle

    Boolean

    Flag to specify whether or not to delete the script bundle files after a successful installation of AI-Scripts on the device.

    Possible values:

    • true—Script bundle files are deleted from the device
    • false—Script bundle files are not deleted from the device

    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.event-profile-management.eventprofiles+xml;version=1 for XML requests
    • application/vnd.juniper.servicenow.event-profile-management.eventprofiles+json;version=1 for JSON requests

    Response Elements

    Element

    Type

    Description

    href

    String

    Link to the install event profile job

    id

    Integer

    ID of the job

    Sample Input

    Sample XML Input

    <installeventprofile>
                        	<devices>
              <device href="/api/juniper/servicenow/device-management/devices/163840"/>
              <device href="/api/juniper/servicenow/device-management/devices/163841"/>
         </devices>
         <neverStoreScriptBundle>false</neverStoreScriptBundle>
          <removeScriptBundle>false</removeScriptBundle>
    	<alterDeviceConfig>false<alterDeviceConfig>
    </installeventprofile>
    

    Sample JSON Input

     installeventprofile:{
            devices:{
                device:[
                    {
                        href:'/api/juniper/servicenow/device-management/devices/163840'
                    },
                    {
                        href:'/api/juniper/servicenow/device-management/devices/163841'
                    }
                ]
            },
            neverstorescriptbundle:'false',
            removescriptbundle:'false'
    	   alterDeviceConfig:”false”
        }
    

    Sample Output

    Sample XML Output

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

    Sample JSON Output

     task:{
            href:'/api/juniper/job-management/jobs/2129990',
            id:2129990
        }
    

    Response Status Code

    Message

    Description

    404 Not Found

    • Invalid device ID
    • event profile does not exist

    500 Internal Server Error

    • Device is not associated with any device group
    • Installing event profile on a connected member device is not allowed
    • Install event profile on a fabric node is not allowed

    Modified: 2016-08-11