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

BinariesService

class BinariesService : ConnectionMultipartRequest<User, ByteArray>

Allows files to be uploaded/downloaded from Cumulocity using the /inventory/binaries api

Types

Attachment

data class Attachment

Wrapper for the content to uploaded/downloaded from Cumulocity

ResponseImpl

inner class ResponseImpl : Response<BinariesService.Attachment>

Constructors

<init>

BinariesService(connection: CumulocityConnectionFactory.CumulocityConnection)

Creates a single use instance that can be used to fetch/send binary content to Cumulocity

Functions

get

fun get(id: String, responder: (Response<BinariesService.Attachment>) -> Unit): Unit

Fetch file contents using Cumulocity internal id of the file

path

fun path(): String

send

fun send(name: String, contentType: String, content: ByteArray, responder: (Response<BinariesService.Attachment>) -> Unit): Unit

Sends the file to Cumulocity to be stored