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

    Get All Event Scripts in a Script Bundle

    Use this API to retrieve event scripts included in a script bundle loaded on a device. Unlike the Get Information About a Script Bundle API, this API does not return the script bundle itself.

    URI

    https://[host]/api/juniper/servicenow/scriptbundle-management/scriptbundles/ {id}/bundleEvents (HTTP method = GET)

    URI Parameters

    Parameter

    Type

    Required

    Description

    ID

    Integer

    Yes

    ID of the script bundle from which event scripts are to be retrieved

    Consumes

    • vnd.juniper.servicenow.scriptbundle-management.bundleevents+json;version=1; charset=UTF-8
    • vnd.juniper.servicenow.scriptbundle-management.bundleevents+xml;version=1; charset=UTF-8

    Response Elements

    Element

    Type

    Description

    uri

    String

    URI of the script bundle

    size

    Integer

    Number of event scripts in the script bundle

    event

    event

    An event script in the script bundle

    ID

    Integer

    ID of the event script

    category

    String

    Category of the event script

    type

    String

    Type of event that triggers the script. Types include:

    • Software failure
    • Hardware failure
    • Resource exhaustion

    subType

    String

    Detailed description for the type of event that triggers the script.

    For example, file system error, communication error, socket failure, excessive memory utilization, database failure, session error, memory allocation error, initialization error, process error, and so on.

    priority

    String

    Priority level of the event script. Values are:

    • Critical
    • High
    • Medium
    • Low

    briefDescription

    String

    A terse description of the event.

    eventDescription

    String

    A detailed description of the event.

    Sample Output

    Sample XML Output

    <bundleevents size="398" uri="/api/juniper/servicenow/scriptbundle-management/scriptbundles/295312/bundleevents">
           <event>
                  <id>294914</id>
                  <category>ACCT</category>
                  <type>Software Failure</type>
                  <subType>Communication Error</subType>
                  <priority>MED</priority>
                  <briefDescription>ACCT_XFER_POPEN_FAIL</briefDescription>
                  <eventDescription>A call to the popen() function failed when the accounting statistics process invoked the indicated command to transfer the indicated file.</eventDescription>
           </event>
           <event>
                  <id>295021</id>
                  <category>ALARMD</category>
                  <type>Software Failure</type>
                  <subType>Initialization failure</subType>
                  <priority>HIGH</priority>
                  <briefDescription>CONNECTION_CHASSISD_FAIL</briefDescription>
                  <eventDescription>The alarm process (alarmd) was unable to connect to the chassis process (chassisd).</eventDescription>
           </event>
           ….
    </bundleevents>
    

    Sample JSON Output

    {
        "bundleevents":{
            "@size":"398",
            "@uri":"/api/juniper/servicenow/scriptbundle-management/scriptbundles/295312/bundleevents",
            "event":[
                {
                    "id":"294914",
                    "category":"ACCT",
                    "type":"Software Failure",
                    "subtype":"Communication Error",
                    "priority":"MED",
                    "briefdescription":"ACCT_XFER_POPEN_FAIL",
                    "eventdescription":"A call to the popen() function failed when the accounting statistics process invoked the indicated command to transfer the indicated file. "
                },
                {
                    "id":"295021",
                    "category":"ALARMD",
                    "type":"Software Failure",
                    "subtype":"Initialization failure",
                    "priority":"HIGH",
                    "briefdescription":"CONNECTION_CHASSISD_FAIL",
                    "eventdescription":"The alarm process (alarmd) was unable to connect to the chassis process (chassisd). "
                }
            ]
        }
    }
    

    Response Status Code

    Message

    Description

    500 Internal Server Error

    No event is available in the script bundle

    Modified: 2016-08-10