Related Documentation
- Junos Space
- Get All Event Profiles
- Get Information About an Event Profile
- Create an Event Profile
- Export All Event Profiles by Type
- Export Event Profiles by ID and Type
- Import Event Profiles from a File
- Get Import Event Profiles Job Details
- Get Event Profiles Import Job Results
- Event Profile Management REST API Overview
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:
|
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. |
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 |
|
500 Internal Server Error |
|
Related Documentation
- Junos Space
- Get All Event Profiles
- Get Information About an Event Profile
- Create an Event Profile
- Export All Event Profiles by Type
- Export Event Profiles by ID and Type
- Import Event Profiles from a File
- Get Import Event Profiles Job Details
- Get Event Profiles Import Job Results
- Event Profile Management REST API Overview