Read Events

With this method you can retrieve all events.

The service retrieves static data for all events that belong to user-defined event type and standard event type with the property set type data.

In addition, you can retrieve a subset of all events, according to the filter criteria provided. For a collective request for a set of events, you have these options:

  • You can restrict the set of events to be retrieved by filter criteria based on all fields available in the response.

  • You can define that the set of matching events shall not be transmitted all at once, but in a paged manner so that only a small number of results is transmitted, thereby reducing the server load.

By default, the service displays a maximum of 500 events per response. You can navigate to the next set of results, if available, using the __next link at the end in the response payload. However, the number of records retrieved depends on the query parameter $top, if provided in the request URL. For more information, see Retrieving List of Records.

Request

URI: /ES/v1/Events

Operation Type: CRUD

HTTP Method: GET

Permissions: <tde>.r

Request Parameters

None

Query Request Parameters

Parameter Type Required Description
$top Integer No Number of records to include in the result set.
$skip Integer No Number of records to exclude from the result set.
$inlinecount String No

Total number of events available; permissible values are allpages and none. The following results apply if this parameter is used in conjunction with the other query parameters:

  • If you use this with the $top and $skip parameters, the result contains the total count of events available.

  • If you use this with $filter parameter, the result contains the total count of events based on the defined filter condition.

$orderby String No

Field name to be used for sorting the result set in ascending order; valid fields are EventId, CorrelationId, BusinessTimestamp, EventType, EventStatus, EventSeverity, EventCode, ThingId, ThingProperty, and ExternalId.

To sort the result set, use asc for the ascending order and desc for the descending order.

$select String No Select condition for the data fields to be included in the result set; valid fields are EventId, CorrelationId, BusinessTimestamp, EventType, EventStatus, EventSeverity, EventCode, ThingId, ThingProperty, and ExternalId.
$filter String No Filter condition to be applied; EventId, CorrelationId, BusinessTimestamp, EventType, EventStatus, EventSeverity, EventCode, ThingId, ThingProperty, and ExternalId.

Request Example

/ES/v1/Events

Retrieves static data for all events that belong to user-defined event type and standard event type with the property set type data

Response

Response Status and Error Codes

Code Description
200 Data retrieved successfully

Payload

Format: JSON

Media types JSON and XML are supported. The JSON for this method has the structure as depicted in the following example:

Example 1

/ES/v1/Events

Retrieves static data for all events that belong to user-defined event type and standard event type with the property set type data

{
	"d": {
		"results": [{
				"__metadata": {
					"id": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('9DDBBD81FD904DBD8A276AA25899F5CE')",
					"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('9DDBBD81FD904DBD8A276AA25899F5CE')",
					"type": "com.sap.appiot.es.Events"
				},
				"EventId": "F392018DE4D54CCFB5FEC72672D4310B",
				"CorrelationId": "BD622E3DA6A14C4D87CDEC935B000001",
				"BusinessTimestamp": "2017-04-08T12:30:00Z",
				"Type": "Alert",
				"EventType": "core.automobiles:AlertEventType",
				"EventInfo": "Alert on temperature",
				"EventStatus": "going",
				"EventSeverity": "2",
				"EventCode": "EventCode2",
				"EventSource": "Test Source01304",
				"ThingId": "0BCDD3EB71DB4935BAF9603577BF73F4",
				"ThingProperty": "core.automobiles:AlertEventPST/alertEvent",
				"ExternalId": "AlertExternal"
			},
			{
				"__metadata": {
					"id": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('3DAD618BA9354232B90FC79A5B542DE6')",
					"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('3DAD618BA9354232B90FC79A5B542DE6')",
					"type": "com.sap.appiot.es.Events"
				},
				"EventId": "5DDF968BDF12404E8D8E1FA301427209",
				"CorrelationId": "3DAD618BA9354232B90FC79A5B542DE6",
				"BusinessTimestamp": "2017-03-12T05:30:00Z",
				"Type": "Important",
				"EventType": "com.sap.appiot.eventtypes:StandardEventType",
				"EventInfo": "Alert on temperature",
				"EventStatus": "Open",
				"EventSeverity": "2",
				"EventCode": "30",
				"EventSource": "Car urgent event",
				"ThingId": "155ABA08434C4F95B56C0A84D8D30ABE",
				"ThingProperty": "core.automobiles:Car/wheel_fl/Temperature",
				"ExternalId": "CI_Pressure-Urgent-PU4312"
			},
			{
				"__metadata": {
					"id": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('12644D8B35624BF7A85B1A425B26E700')",
					"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('12644D8B35624BF7A85B1A425B26E700')",
					"type": "com.sap.appiot.es.Events"
				},
				"EventId": "12644D8B35624BF7A85B1A425B26E700",
				"CorrelationId": "3DAD618BA9354232B90FC79A5B542DE6",
				"BusinessTimestamp": "2017-04-19T12:00:00Z",
				"Type": "com.sap.appiot.eventtypes:StandardEventType",
				"EventType": "com.sap.appiot.eventtypes:StandardEventType",
				"EventInfo": "Alert on temperature",
				"EventStatus": "Open",
				"EventSeverity": "3",
				"EventCode": "30",
				"EventSource": "Drilling hole length measurer",
				"ThingId": "237FC64161FC46C2A72AB8BE3533C1B0",
				"ThingProperty": "core.automobiles:dd350/dd350_holes/Hole_Info_Length",
				"ExternalId": "XW5619"
			},
			{
				"__metadata": {
					"id": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('50F70DDB6CD44B77ACBA61A3DE09B7D2')",
					"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('50F70DDB6CD44B77ACBA61A3DE09B7D2')",
					"type": "com.sap.appiot.es.Events"
				},
				"EventId": "50F70DDB6CD44B77ACBA61A3DE09B7D2",
				"CorrelationId": "3DAD618BA9354232B90FC79A5B542DE6",
				"BusinessTimestamp": "2016-01-01T09:02:00Z",
				"Type": "Warning",
				"EventType": "com.sap.appiot.eventtypes:StandardEventType",
				"EventInfo": "Alert on temperature",
				"EventStatus": "Completed",
				"EventSeverity": "1",
				"EventCode": "30",
				"EventSource": "Generator",
				"ThingId": "483BA41481A4450D99010F4CFDE3B9A6",
				"ThingProperty": "core.automobiles:ABCXSeries/wheel_fr",
				"ExternalId": "eevents3_reg110"
			},
			{
				"__metadata": {
					"id": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('EDCB5EF081C2439AB658B231631B1F7F')",
					"uri": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events('EDCB5EF081C2439AB658B231631B1F7F')",
					"type": "com.sap.appiot.es.Events"
				},
				"EventId": "EDCB5EF081C2439AB658B231631B1F7F",
				"CorrelationId": "c39d9066076840e18c3718ee77b4c353",
				"BusinessTimestamp": "2017-03-24T06:00:00Z",
				"Type": "Alert",
				"EventType": "core.automobiles:SampleEventType",
				"EventInfo": "Alert on temperature",
				"EventStatus": "open",
				"EventSeverity": "2",
				"EventCode": "EventCode1",
				"EventSource": "Test Source13687",
				"ThingId": "AB6113709D044F208C77DF2D23B42153",
				"ThingProperty": "core.automobiles:SampleEventPST/sampleEvent",
				"ExternalId": "Perf_TypedEvents_13687"
			}
		],
		"__next": "https://events-sap-ci.cfapps.sap.hana.ondemand.com:443/ES/v1/Events?$skiptoken=20"
	}
}