C8yEventsService
public class C8yEventsService : JcConnectionRequest<C8yCumulocityConnection>
Allows events related to C8yManagedObject to fetched and posted to Cumulocity
Refer to the c8y API documentation for more information
-
Used when fetching
C8yEvents to determines the maximum number allowed in a single request, default is 50Declaration
Swift
public var pageSize: Int -
Retrieves the
C8yEventdetails for the given c8y internal idDeclaration
Swift
public func get(_ id: String) -> AnyPublisher<JcRequestResponse<C8yEvent>, APIError> -
Retrieves all events associated with the given source
C8yManagedObjectNotes:
It retreives the newest to oldest events first with a maximum number specified by
pageSizein a single request. Call the method incrementing the page number to fetch older and older events if required.Declaration
Swift
public func get(source: String, pageNum: Int) -> AnyPublisher<JcRequestResponse<C8yPagedEvents>, APIError> -
Submits the `C8yEvent` to cumulocity for processingDeclaration
Swift
public func post(_ event: C8yEvent) throws -> AnyPublisher<JcRequestResponse<C8yEvent>, APIError>
View on GitHub
C8yEventsService Class Reference