Page tree

The web service API uses the POST method to create events. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see Web services authentication.

You can now create multiple events by default. BMC recommends this implementation.

However, if you still want to create a single event (single event JSON body support in the input), open the bppmws.properties file and set the allowSingleEventBodyInCreate flag to true.

URL to create events

The generic format of the URL to create events is as follows:

http|https://<serverHost>:<port>/bppmws/api/<resourceType>/create?
<queryParam1>&<queryParam2>&...<queryParamn>

Example

http://bppmwsserver:80/bppmws/api/Event/create?routingId=<cellName>/
<servername>&routingIdType=<CELL_NAME/SERVER_NAME>

Input parameters in the JSON format to create events

You can provide the following parameters to create events in the JSON format along with the URL.

When you provide input parameters for any web service request, you must specify the content-type parameter in the header of the web service request as follows:

content-type application/json

Input parameters in the JSON format to create events

AttributesDescription
applicationtype

Type of integrated application. The supported types are as follows:

  • CHANGE_MANAGEMENT
  • CAPACITY_MANAGEMENT

CHANGE_MANAGEMENT indicates that the event is created for the integration of BMC Remedy Change Management, and CAPACITY_MANAGEMENT indicates that the event is created for integration of BMC Capacity Optimization with BMC ProactiveNet.

This parameter is applicable only for events created for an integration.

eventSourceHostNameName of the server from which the event is generated. This parameter is optional.
eventSourceIPAddressIP address of the server from which the event is generated. This parameter is optional.
eventIdUnique identifier of the current event at the event source. This parameter is applicable only for events created for an integration.
transactionIdUnique identifier for the transaction with BMC ProactiveNet. This parameter is applicable only for events created for BMC Remedy Change Management integration.
correlationIdIdentifier of the event to which the current event is related. This parameter is applicable only for events created for an integration.
routingInfoName of the BMC ProactiveNet cell<CELL_NAME> or BMC ProactiveNet Server name<SERVER_NAME> where the event should be created. This parameter is optional. If this parameter is not provided, the event is created on the resource where the CI exists.
eventType

Type of event based on application type. The supported types are as follows:

  • CM_CHANGE_EVENT (applicable for integration of BMC Remedy Change Management)
  • CM_TASK_EVENT (applicable for integration of BMC Remedy Change Management)

This parameter is applicable only for events created for BMC Remedy Change Management integration.

attributes

Attributes required to create events. The attributes vary according to the type of event. The attributes and their values are case sensitive and must exactly match the values defined for the event class.

CLASS attribute is mandatory to create events.

Sample input parameters in the JSON format are as follows:

[
    {
        "eventSourceHostName": "bppmwsserver1.domain.com",
        "eventSourceIPAddress": "192.72.255.151",
        "attributes": {
            "CLASS": "EVENT",
            "mc_object_uri": "",
            "severity": "WARNING",
            "msg": "AppServer CPU usage:reached threshold=60",
            "mc_smc_alias": "Prod application SRV1",
            "mc_smc_id": "Model1_10000_S0109",
            "mc_owner": "Administrator",
            "mc_priority": "PRIORITY_4"
        }
    }, {
        "eventSourceHostName": "bppmwsserver2.domain.com",
        "eventSourceIPAddress": "192.72.255.152",
        "attributes": {
            "CLASS": "EVENT",
            "mc_object_uri": "",
            "severity": "CRITICAL",
            "msg": "AppServer CPU usage:reached threshold=80",
            "mc_smc_alias": "Prod application SRV2",
            "mc_smc_id": "Model1_10000_S0110",
            "mc_owner": "Administrator",
            "mc_priority": "PRIORITY_5"
        }
    }
]

Note

To associate the event with the specified resource, ensure that either the mc_smc_id parameter of the event has the same value as that of the mc_udid parameter of the resource or that the mc_smc_alias parameter of the event has the same value as that of the componentAlias parameter of the resource.

JSON response to the create API

A sample JSON response is as follows:

{
    "responseList": [
        {
            "statusCode": "200",
            "statusMsg": "OK"
        },
        {
            "statusCode": "200",
            "statusMsg": "OK"
        }
    ],
    "statusCode": "200",
    "statusMsg": "OK",
    "responseTimeStamp": "2014-04-02T06:09:11"
}