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 an Event Profile

    An event profile is a set of event scripts selected from an AI-Script bundle. Using event profiles, you can specify the event scripts that you want to install on Service Now devices.

    Use this API to create an event profile.

    URI

    https://[host]/api/juniper/servicenow/event-profile-management/createEventProfile (HTTP method = POST)

    Consumes

    • application/vnd.juniper.servicenow.event-profile-management.createeventprofile +xml;version=1;charset=UTF-8
    • application/vnd.juniper.servicenow.event-profile-management.createeventprofile +json;version=1;charset=UTF-8

    Request Elements

    Element

    Type

    Description

    profileName

    String

    Name of the event profile

    profileDescription

    String

    Description of the event profile

    scriptBundle

    String

    URL of the script bundle from which the event profile is to be created

    events

    event

    Collection of events in the event profile

    event

    event

    An event in the event profile

    ID

    Integer

    ID of the event script in the Service Now database

    priority

    String

    Priority level of the event script. Values are:

    • Critical
    • High
    • Medium
    • Low

    domainId

    Integer

    ID of the domain in which the event profile should be created.

    This is an optional element. If no domain ID is provided, the event profile is created in the Global domain.

    Note: The create request fails if a user does not have access to the Global domain and if no domain ID is provided with the create request.

    Produces

    • application/vnd.juniper.servicenow.event-profile-management.servicenowmsg +xml;version=1
    • application/vnd.juniper.servicenow.event-profile-management.servicenowmsg +json;version=1

    Response Elements

    Element

    Type

    Description

    status

    String

    Status of the create event profile job

    desc

    String

    Description of the job status

    keys

    key

    Collection of IDs of event scripts of events included the event profile

    key

    Integer

    ID of the event script

    Sample Input

    Sample XML Input

    <createEventProfile>
           <profileName>testEventProfile1</profileName>
    	   <domainId>10</domainId>
           <description>testEventProfile1Test1</description>
           <scriptBundle uri="/api/juniper/servicenow/scriptbundle-management/scriptbundles/65536"/>
           <events>
                  <event>
                         <id>32799</id>  
                         <priority>Critical</priority>
                  </event>
           </events>
    </createEventProfile>
    

    Sample JSON Input

    {
                    "createEventProfile": {
                                    "profileName": "testProfile1",
                                    "description": "testProfile",
    				        "domainId":"10"
                                    "scriptBundle":{ "@href":"/api/juniper/servicenow/scriptbundle-management/scriptbundles/65536"},
                                    "events": {
                                                    "event": {
                                                                    "id": 32799,
                                                                    "priority": "Low"
                                                    }
                                    }
                    }
    }
    

    Sample Output

    Sample XML Output

    <servicenowmsg>
           <status>
                  <desc>Event profile created successfully</desc>
                  <keys>
                         <key>98306</key>
                  </keys>
           </status>
    </servicenowmsg>
    

    Sample JSON Output

    {
        "servicenowmsg":{
            "status":{
                "desc":"Event profile created successfully",
                "keys":{
                    "key":98306
                }
            }
        }
    }
    

    Response Status Code

    Message

    Description

    500 Internal Server Error

    Profile Name is already in Use

    400 Bad Request

    Profile does not contain any valid events

    404 Not Found

    Invalid Script Bundle ID

    Modified: 2016-08-11