Package com.cumulocity.sdk.client.event
Interface EventBinaryApi
- All Known Implementing Classes:
EventBinaryApiImpl
public interface EventBinaryApi
API to perform operations to create, retrieve and delete event binaries. One event can store only one file.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateEventBinary(String id, byte[] bytes) Upload a file (binary) with content-type of "application/octet-stream" (default) to given event ID.voidRemove stored file from given event ID.getEventBinary(String id) Download a stored file from given event ID.voidupdateEventBinary(String id, byte[] bytes) Replace the attached file (binary) to given event ID.
-
Method Details
-
getEventBinary
Download a stored file from given event ID.- Parameters:
id- ID of event- Returns:
- file (binary)
- Throws:
SDKException- if download fails
-
createEventBinary
Upload a file (binary) with content-type of "application/octet-stream" (default) to given event ID.- Parameters:
id- ID of eventbytes- file (binary) to be uploaded- Throws:
SDKException- if upload fails
-
updateEventBinary
Replace the attached file (binary) to given event ID.- Parameters:
id- ID of eventbytes- file (binary) to be uploaded- Throws:
SDKException- if upload fails
-
deleteEventBinary
Remove stored file from given event ID.- Parameters:
id- ID of event- Throws:
SDKException- if delete fails
-