Device Reporting File Upload Results
Function
This API is used by a device to report the file upload result.
Topic
$oc/devices/{device_id}/sys/events/up
Parameters
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Indicates the device that the event is about. If this parameter is not carried, the device specified in the topic is considered to be the device involved. |
services |
Optional |
List<ServiceEvent> |
Indicates a list of services that the event is about. |
ServiceEvent structure
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
service_id |
Mandatory |
String |
System field. The value is fixed to $file_manager. |
event_type |
Mandatory |
String |
System field. The value is fixed to upload_result_report. |
event_time |
Optional |
String |
Indicates the time when the event occurs. |
paras |
Mandatory |
Object |
Indicates the event parameters in JSON format. |
paras structure
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
object_name |
Mandatory |
String |
Indicates the name of the object uploaded to OBS. |
result_code |
Mandatory |
Integer |
Indicates the file upload result.
|
status_code |
Optional |
Integer |
Indicates the status code returned by OBS after a file upload. |
status_description |
Optional |
String |
Indicates the status description returned by OBS after a file upload. |
Example
Topic: $oc/devices/{device_id}/sys/events/up Data format: { "object_device_id": "{object_device_id}", "services": [{ "service_id": "$file_manager", "event_type": "upload_result_report", "event_time": "20151212T121212Z", "paras": { "object_name": "c6b39067b0325db34663d3ef421a42f6_12345678_a.jpg", "result_code": 0, "status_code": 200, "status_description": "upload success" } }] }
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