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 Information About a Script Bundle

    Use this API to retrieve information, including events, about a script bundle.

    URI

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

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the script bundle for which information is to be retrieved

    Consumes

    None

    Produces

    • application/vnd.juniper.servicenow.scriptbundle-management.scriptbundles +xml;version=1;
    • application/vnd.juniper.servicenow.scriptbundle-management.scriptbundles +json;version=1;

    Response

    Element

    Type

    Description

    name

    String

    Name of script bundle

    receiveTime

    String

    Date and time AI-Script was installed

    version

    String

    AI-Script package version

    isDefault

    Boolean

    Flag to indicate whether or not the script bundle is the default script bundle in Service Now

    Possible values:

    • true—The script bundle is the default script bundle
    • false—The script bundle is not the default script bundle

    bundleEvents

    bundleEvents

    Collection of events in the script bundle

    uri

    String

    Link to the events in the script bundle

    event

    event

    An event in the script bundle

    eventID

    Integer

    ID of the AI-Script event

    category

    String

    AI-Script event category

    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

    Terse description of the event

    eventDescription

    String

    Detailed description of the event

    Sample Output

    Sample XML Output

    <scriptbundle>
          <name>jais-3.2R1.2-signed.tgz</name>
          <receiveTime>2012-01-19 04:58:04.0</receiveTime>
          <version>3.2R1.2</version>
          <isDefault>false</isDefault>
          <bundleEvents uri="/api/juniper/servicenow/scriptbundle-management/scriptbundles/295312/ bundleEvents">
                <event>
                <eventId>0</eventId>
                      <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>
                      <eventId>0</eventId>
                      <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>
    </scriptbundle>
    

    Sample JSON Output

    {
        "scriptbundle":{
          "name":"jais-3.2R1.2-signed.tgz",
          "receivetime":"2012-01-19 04:58:04.0",
           "version":"3.2R1.2",
           "isdefault":"false",
           "bundleevents":{
               "@uri":"/api/juniper/servicenow/scriptbundle-management/scriptbundles/295312/bundleEvents",
                "event":[
                    {
                        "eventid":"0",
                        "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. "
                    },
                    {
                        "eventid":"0",
                        "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

    404 Not Found

    Invalid script bundle ID

    Modified: 2016-08-11