io.edgehog.devicemanager.fileTransfer.Progress v0.1
Progress of a file transfer.
If the request enabled progress reporting, the device will send the progress of the operation.
About
This interface is of type datastream and is owned by the device, meaning that it is the device which initiates the data flow. Thanks to this type of interface, the device can send a mutable, ordered stream of data, with no concept of persistent state or synchronization.
Data gets sent with an object aggregation. Astarte expects the owner to send all of the interface's mappings at the same time, packed in a single message.
Mappings
The interface has the following mappings:
/request/idwithstringtype. Transfer ID (UUID) for the file/request/typewithstringtype. Direction of the file transfer/request/byteswithlongintegertype. Progress of the transfer in number of bytes transferred./request/totalByteswithlongintegertype. Total size of the transfer.
/request/id
Transfer ID (UUID) for the file
This endpoint accepts values of type string: an UTF-8 string, at most 65536 bytes long.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 3600 seconds before it is erased from the database.
/request/type
Direction of the file transfer
Specifies the direction of the transfer. Allowed values: 'server_to_device' or 'device_to_server'.
This endpoint accepts values of type string: an UTF-8 string, at most 65536 bytes long.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 3600 seconds before it is erased from the database.
/request/bytes
Progress of the transfer in number of bytes transferred.
This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 3600 seconds before it is erased from the database.
/request/totalBytes
Total size of the transfer.
Reports the total number of bytes that have to be transferred. If the total size is not known this field contains a value of '-1'.
This endpoint accepts values of type longinteger: a signed 64 bit integer (please note that longinteger is represented as a string by default in JSON-based APIs.).
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when the transport successfully sends the data regardless of the outcome. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 3600 seconds before it is erased from the database.