Cumulocity API Services / com.softwareag.jc.cumulocity.services.api / EventsService

EventsService

class EventsService : ConnectionRequest<User, List<Event>>

Access point for retrieving and sending events to/from Cumulocity, data represented as Event and accessed via API endpoint /event/events

Constructors

<init>

EventsService(connection: CumulocityConnectionFactory.CumulocityConnection)

Creates a single use instance that cab be used to launch a query, do not reuse the same instance for multiple queries

Properties

connection

val connection: CumulocityConnectionFactory.CumulocityConnection

Connection referencing cumulocity tenant, instance and credentials to use

Functions

get

fun get(id: String, responder: RequestResponder<List<Event>>): Unit

Retrieves the event for the given id

getAllForDevice

fun getAllForDevice(id: String, responder: RequestResponder<List<Event>>): Unit

Retrieves the 100 events emitted for the given object

path

fun path(): String

post

fun post(events: Array<Event>, responder: RequestResponder<List<Event>>): Unit

Submits the events to cumulocity for the given managed object

response

fun response(response: String): List<Event>