io.edgehog.devicemanager.fileTransfer.DeviceToServer v0.1
File transfer from a Device to a Server.
Request a file transfer operation. Providing an URL where the device will upload a file with an HTTP PUT request, the source of the file to upload is implementation specific.
About
This interface is of type datastream and is owned by the server, meaning that it is the server which initiates the data flow. Thanks to this type of interface, the server 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/urlwithstringtype. The URL to upload the file to/request/httpHeaderKeyswithstringarraytype. Keys for the HTTP headers, must be in the order of the values/request/httpHeaderValueswithstringarraytype. Values for the HTTP headers, must be in the order of the keys/request/encodingwithstringtype. Encoding of the file or directory to upload/request/progresswithbooleantype. Flag to enable the progress reporting of the download./request/sourceTypewithstringtype. Source from which the file should be read from./request/sourcewithstringtype. Source-specific information on what to upload to the server for the source.
/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 it has been received at least once by the recipient. 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/url
The URL to upload the file to
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 it has been received at least once by the recipient. 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/httpHeaderKeys
Keys for the HTTP headers, must be in the order of the values
This endpoint accepts values of type stringarray: a list of values, represented as a JSON Array. Arrays can have up to 1024 items and each item must respect the limits of its scalar type.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when it has been received at least once by the recipient. 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/httpHeaderValues
Values for the HTTP headers, must be in the order of the keys
This endpoint accepts values of type stringarray: a list of values, represented as a JSON Array. Arrays can have up to 1024 items and each item must respect the limits of its scalar type.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when it has been received at least once by the recipient. 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/encoding
Encoding of the file or directory to upload
Optional enum string for the file encoding with default value empty, other values are: [gz, lz4, tar, tar.gz, tar.lz4]
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 it has been received at least once by the recipient. 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/progress
Flag to enable the progress reporting of the download.
This endpoint accepts values of type boolean: either true or false, adhering to JSON boolean type.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Data is considered delivered when it has been received at least once by the recipient. 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/sourceType
Source from which the file should be read from.
String enum specifying the source type, with allowed values: [storage, streaming, filesystem].
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 it has been received at least once by the recipient. 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/source
Source-specific information on what to upload to the server for the source.
The value depends on the selected source type: for 'storage' is the ID of an 'io.edgehog.devicemanager.storage.File' property, for 'streaming' it's an empty string, and for 'filesystem' is a path of a file on the device.
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 it has been received at least once by the recipient. 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.