Device Requesting a URL for File Download
Function
This API is used by a device to report a request for obtaining a URL for file download.
Topic
Upstream: $oc/devices/{device_id}/sys/events/up
Parameters
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Explanation:
|
services |
Optional |
List<ServiceEvent> |
Explanation: List of services that an event is about. |
ServiceEvent structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
service_id |
Mandatory |
String |
Explanation: System field. Value range: Fixed at $file_manager. |
event_type |
Mandatory |
String |
Explanation: System field. Value range: Fixed at get_download_url. |
event_time |
Optional |
String |
Explanation: Event time. UTC time format: yyyyMMdd'T'HHmmss'Z'. If this parameter is not carried in the reported data or is in incorrect format, the time when the platform receives the data is used. |
paras |
Mandatory |
Object |
Explanation: Event parameters in JSON format. |
paras structure
Parameter |
Mandatory/Optional |
Type |
Description |
---|---|---|---|
fileName |
Mandatory |
String |
Explanation: Name of the file to be downloaded. |
file_attributes |
Optional |
Object |
Explanation: File attributes, which are objects in JSON format. |
Example
Topic: $oc/devices/{device_id}/sys/events/up Data format: { "object_device_id": "{object_device_id}", "services": [{ "service_id": "$file_manager", "event_type": "get_download_url", "event_time": "20151212T121212Z", "paras": { "file_name": "a.jpg", "file_attributes": { "hash_code": "58059181f378062f9b446e884362a526", "size": 1024 } } }] }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot