Creating events
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.
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>
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:
Input parameters in the JSON format to create events
Attributes | Description |
---|---|
applicationtype | Type of integrated application. The supported types are as follows:
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 Infrastructure Management. |
eventSourceHostName | Name of the server from which the event is generated. This parameter is optional. |
eventSourceIPAddress | IP address of the server from which the event is generated. This parameter is optional. |
eventId | Unique identifier of the current event at the event source. This parameter is applicable only for events created for an integration. |
transactionId | Unique identifier for the transaction with Infrastructure Management. This parameter is applicable only for events created for BMC Remedy Change Management integration. |
correlationId | Identifier of the event to which the current event is related. This parameter is applicable only for events created for an integration. |
routingInfo | Name of the Infrastructure Managementcell<CELL_NAME> or Infrastructure Management 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:
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. |
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"
}
}
]
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"
}