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=2; charset=UTF-8
application/vnd.juniper.servicenow.event-profile-management.installeventprofile+json;version=2; charset=UTF-8
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:
|
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:
|
alterDeviceConfig | Boolean | Flag to modify the device configuration while committing the event profile on the device
Note: This element is applicable only while installing AI-Scripts 5.0 and later on a device for the first time. |
commitComment | String | Comment provided when installing event profile on devices Maximum number of characters allowed is 255. |
Produces
application/vnd.juniper.servicenow.event-profile-management.eventprofiles+xml;version=2
application/vnd.juniper.servicenow.event-profile-management.eventprofiles+json;version=2
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/65803"/> </devices> <neverStoreScriptBundle>false</neverStoreScriptBundle> <removeScriptBundle>false</removeScriptBundle> <alterDeviceConfig>true</alterDeviceConfig> <commitComment>Installing AI-Scripts</commitComment> </installeventprofile>
Sample JSON Input
{ "installeventprofile": { "devices": { "device": [ { "@href": "/api/juniper/servicenow/device-management/devices/65803" }, { "@href": "/api/juniper/servicenow/device-management/devices/69410" } ] }, "neverStoreScriptBundle": "false", "removeScriptBundle": "false", "alterDeviceConfig": "true", "commitComment": "Installing AI-Scripts" } }
Sample Output
Sample XML Output
task href= "/api/space/job-management/jobs/425990" > <id>425990</id> </task>
Sample JSON Output
{ "task": { "@href": "/api/space/job-management/jobs/425995", "id": 425995 } }
Response Status Code
Message | Description |
---|---|
404 Not Found |
|
500 Internal Server Error |
|