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

    Import Event Profiles from a File

    Use this API to import event profiles to a device from an XML file.

    The XML file must be sent as part of the import event profile request. Currently, this API can import event profiles from only one file. However, the input file can contain any number of event profiles in it. Once the request is validated, a job is scheduled and the job-id is returned to the consumer for tracking the job. A queue has to be created before invoking this API.

    URI

    https://[host]/api/juniper/servicenow/event-profile-management/eventProfiles/import? queue= https://[host]/api/hornet-q/queues/queue-name (HTTP method = POST)

    URI Parameters

    Parameter

    Type

    Required

    Description

    queue-name

    string

    Yes

    Name of the queue for import event profiles job

    Consumes

    Multipart form data. The XML file containing the event profiles must be sent as a part of the request.

    Request Elements

    Element

    Type

    Description

    profileName

    String

    Name of the event profile

    description

    String

    Description of the event profile

    scriptsEnabledCount

    Integer

    Number of scripts enabled in the event profile

    scriptsDisabledCount

    Integer

    Number of scripts disabled in the event profile

    createdBy

    String

    Entity that created the event profile.

    The value is always set to Service Now.

    bundle

    String

    Specifies details such as name and version of the script bundle to which the event profile belongs

    event

    String

    Specifies details such as description, category, KB article, and AI-Scripts bundle ID associated with the event profile

    Produces

    Import event profile job ID to track the import event profile job.

    Response Elements

    Element

    Type

    Description

    href

    String

    Link to the import event profiles job.

    id

    Integer

    ID of the import event profiles job.

    Sample Input

    Sample XML Input

    <event-profiles>
      <event-profile>
        <profileName>Base_Profile_4_1R4_1</profileName>
        <description>Base Profile for Bundle Version: 4.1R4.1</description>
        <scriptsEnabledCount>2</scriptsEnabledCount>
        <scriptsDisabledCount>0</scriptsDisabledCount>
        <createdBy>Service Now</createdBy>
        <bundle>
          <name>jais-4.1R4.1-signed.tgz</name>
          <version>4.1R4.1</version>
        </bundle>
        <events>
          <event>
            <activateDescription>Capture ACCT_MALLOC_FAILURE Events</activateDescription>
            <briefDescription>ACCT_MALLOC_FAILURE</briefDescription>
            <category>PFED</category>
            <eventDescription>The accounting statistics process could not allocate memory from the heap.</eventDescription>
            <expressRMA>false</expressRMA>
            <featureName>ACCT_MALLOC_FAILURE.slax</featureName>
            <fileName>ACCT_MALLOC_FAILURE.slax</fileName>
            <helpText>ACCT_MALLOC_FAILURE</helpText>
            <kbURL>KB18749</kbURL>
            <minimumVersion>9.4</minimumVersion>
            <name>ACCT_MALLOC_FAILURE</name>
            <priority>3</priority>
            <scriptId>47</scriptId>
            <subType>Memory Consumption</subType>
            <type>Resource Exhaustion</type>
          </event>
          <event>
            <activateDescription>Capture ACCT_XFER_POPEN_FAIL Events</activateDescription>
            <briefDescription>ACCT_XFER_POPEN_FAIL</briefDescription>
            <category>ACCT</category>
            <eventDescription>A call to the popen() function failed when the accounting statistics process invoked the indicated command to transfer the indicated file.</eventDescription>
            <expressRMA>false</expressRMA>
            <featureName>ACCT_XFER_POPEN_FAIL.slax</featureName>
            <fileName>ACCT_XFER_POPEN_FAIL.slax</fileName>
            <helpText>ACCT_XFER_POPEN_FAIL</helpText>
            <kbURL>KB18750</kbURL>
            <minimumVersion>9.4</minimumVersion>
            <name>ACCT_XFER_POPEN_FAIL</name>
            <priority>3</priority>
            <scriptId>263</scriptId>
            <subType>Communication Error</subType>
            <type>Software Failure</type>
          </event>events>
      </event-profile>
    </event-profiles>

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task href="/api/space/job-management/jobs/262146">
    	<id>262146</id>
    </task>
    

    Modified: 2016-08-11