File Upload API
Start
Start a file upload operation.
Request
Hono Command: command//<name>:<namespace>/req//start
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/startInformation about the affected Thing and the type of operation path /features/AutoUploadable/inbox/messages/startA path to the AutoUploadableFeature, it’s message channel, andstartcommandHeaders Additional headers response-required true/false If response is required content-type application/jsonThe content type correlation-id UUID Used for correlating protocol messages, the same correlation-id as the sent back response message Value correlationID other UUID Identifier of the uploaded file options Options are specific for each provider storage.provider aws/azure/generic Storage provider that will be used for uploading the files
Example : Start uploading a file.
Topic: command//edge:device/req//start
{
"topic":"edge/device/things/live/messages/start",
"headers":{
"response-required":true,
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/inbox/messages/start",
"value":{
"correlationID":"upload-id-1704439450#n",
"options":{
"aws.access.key.id":"AWSACCESSKEYID",
"aws.region":"eu-central-1",
"aws.s3.bucket":"blob-upload-test",
"aws.secret.access.key":"AWSSECRETACCESSKEY",
"storage.provider":"aws"
}
}
}
Response
Hono Command : command//<name>:<namespace>/res//start
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/startInformation about the affected Thing and the type of operation path /features/AutoUploadable/outbox/messages/startA path to the AutoUploadableFeature, it’s message channel, andstartcommandHeaders Additional headers content-type application/jsonThe content type correlation-id <UUID> The same correlation id as the sent request message Status Status of the operation start upload the file
Example : Successful response of a start file upload operation.
Topic: `command//edge:device/res//start``
{
"topic":"edge/device/things/live/messages/start",
"headers":{
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/outbox/messages/start",
"status": 204
}
Trigger
Trigger a file upload operation.
Request
Hono Command: command//<name>:<namespace>/req//trigger
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/triggerInformation about the affected Thing and the type of operation path /features/AutoUploadable/inbox/messages/triggerA path to the AutoUploadableFeature, it’s message channel, andtriggercommandHeaders Additional headers response-required true/false If response is required content-type application/jsonThe content type correlation-id UUID Used for correlating protocol messages, the same correlation-id as the sent back response message Value correlationID other UUID Identifier of the triggered file options Options are specific for each provider
Example : Trigger a file upload operation.
Topic: command//edge:device/req//trigger
{
"topic":"edge/device/things/live/messages/trigger",
"headers":{
"response-required":true,
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/inbox/messages/trigger",
"value":{
"correlationID":"other <UUID>",
"options":{}
}
}
Response
Hono Command : command//<name>:<namespace>/res//trigger
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/triggerInformation about the affected Thing and the type of operation path /features/AutoUploadable/outbox/messages/triggerA path to the AutoUploadableFeature, it’s message channel, andtriggercommandHeaders Additional headers content-type application/jsonThe content type correlation-id <UUID> The same correlation id as the sent request message Status Status of the triggeroperation
Example : Successful response of a trigger operation.
Topic: `command//edge:device/res//trigger``
{
"topic":"edge/device/things/live/messages/trigger",
"headers":{
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/outbox/messages/trigger",
"status":204
}
Cancel
Cancel a file upload operation.
Request
Hono Command: command//<name>:<namespace>/req//cancel
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/cancelInformation about the affected Thing and the type of operation path /features/AutoUploadable/inbox/messages/cancelA path to the AutoUploadableFeature, it’s message channel, andcancelcommandHeaders Additional headers response-required true/false If response is required content-type application/jsonThe content type correlation-id UUID Used for correlating protocol messages, the same correlation-id as the sent back response message Value correlationID other UUID Identifier of the uploaded file statusCode This status code is set to update status code message This message is set to update status message
Example : Cancel a file upload operation.
Topic: command//edge:device/req//cancel
{
"topic":"edge/device/things/live/messages/cancel",
"headers":{
"response-required":true,
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/inbox/messages/cancel",
"value":{
"correlationID":"upload-id-1704439450#n",
"statusCode": 400,
"message":"description why the upload is canceled "
}
}
Response
Hono Command : command//<name>:<namespace>/res//cancel
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/cancelInformation about the affected Thing and the type of operation path /features/AutoUploadable/outbox/messages/cancelA path to the AutoUploadableFeature, it’s message channel, andcancelcommandHeaders Additional headers content-type application/jsonThe content type correlation-id <UUID> The same correlation id as the sent request message Status Status of the operation cancelfile upload
Example : The response of the cancel file upload operation.
Topic: `command//edge:device/res//cancel``
{
"topic":"edge/device/things/live/messages/cancel",
"headers":{
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/outbox/messages/cancel",
"status":204
}
Activate
Activate an upload of a file.
Request
Hono Command: command//<name>:<namespace>/req//activate
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/activateInformation about the affected Thing and the type of operation path /features/AutoUploadable/inbox/messages/activateA path that references a part of a Thing which is affected by this message Headers Additional headers response-required true/false If response is required content-type application/jsonThe content type correlation-id UUID Used for correlating protocol messages, the same correlation-id as the sent back response message Value from A Time after which the upload must be activated to A Time grater than frommarks the end of activated
Example : Activate file upload.
Topic: command//edge:device/req//activate
{
"topic":"edge/device/things/live/messages/activate",
"headers":{
"response-required":true,
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/inbox/messages/activate",
"value":{
"from":957139200,
"to":959817599
}
}
Response
Hono Command : command//<name>:<namespace>/res//activate
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/activateInformation about the affected Thing and the type of operation path /features/AutoUploadable/outbox/messages/activateA path to the AutoUploadableFeature, it’s message channel, andactivatecommandHeaders Additional headers content-type application/jsonThe content type correlation-id <UUID> The same correlation id as the sent request message Status Status of the operation activatefile upload
Example : Successful response of an activate file upload operation.
Topic: `command//edge:device/res//activate``
{
"topic":"edge/device/things/live/messages/activate",
"headers":{
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/outbox/messages/activate",
"status":204
}
Deactivate
Deactivate a file upload.
Request
Hono Command: command//<name>:<namespace>/req//deactivate
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/deactivateInformation about the affected Thing and the type of operation path /features/AutoUploadable/inbox/messages/deactivateA path to the AutoUploadableFeature, it’s message channel, anddeactivatecommandHeaders Additional headers response-required true/false If response is required content-type application/jsonThe content type correlation-id UUID Used for correlating protocol messages, the same correlation-id as the response message Value
Example : Deactivate a file upload.
Topic: command//edge:device/req//deactivate
{
"topic":"edge/device/things/live/messages/deactivate",
"headers":{
"response-required":true,
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/inbox/messages/deactivate",
"value":{}
}
Response
Hono Command : command//<name>:<namespace>0/res//deactivate
Ditto Message:
Name Value Description topic <name>/<namespace>/things/live/messages/deactivateInformation about the affected Thing and the type of operation path /features/AutoUploadable/outbox/messages/deactivateA path to the AutoUploadableFeature, it’s message channel, anddeactivatecommandHeaders Additional headers content-type application/jsonThe content type correlation-id <UUID> The same correlation id as the sent request message Status Status of the operation deactivatefile upload
Example : Successful response of the deactivate file upload operation.
Topic: `command//edge:device/res//deactivate``
{
"topic":"edge/device/things/live/messages/deactivate",
"headers":{
"content-type":"application/json",
"correlation-id":"<UUID>"
},
"path":"/features/AutoUploadable/outbox/messages/deactivate",
"status":204
}