You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Current »
Requires Authentication?
Yes
Response Formats
json
HTTP Methods
GET
Returns a slit of meta data information used for Daily Report configuration.
http://{host}/api/2.0/reports/meta/.format
http://44.235.52.211/api/2.0/reports/meta/.json
{ "ReportTypes": { "2": "Configuration Report" }, "AgentTypes": { "5": "Email", "15": "FTP" } }
Returns a list of all Reports configuration data.
http://{host}/api/2.0/reports/.format
http://44.235.52.211/api/2.0/reports/.json
[ { "Report": { "id": 1, "type_id": 2, "device_id": 9011, "agent_type_id": 15, "agent_id": 1, "time": "00:00", "modified": "1619412644269", "created": "1619412644269" } }, { "Report": { "id": 2, "type_id": 2, "device_id": 9011, "agent_type_id": 15, "agent_id": 2, "time": "00:00", "modified": "1619412667474", "created": "1619412667474" } } ]
Returns a single specific Report configuration data.
http://{host}/api/2.0/reports/{id}/.format
Parameter
Data Type
Description
id(required)
integer
The ID of the desired Daily Report to be viewed.
http://44.235.52.211/api/2.0/reports/1/.json
{ "Report": { "id": 1, "type_id": 2, "device_id": 9011, "agent_type_id": 5, "agent_id": 1, "time": "00:00", "modified": "1617036009750", "created": "1617036009750" } }
POST
Adds a new Daily Report.
Body
{ "Report": { "type_id": 2, "device_id": 9011, "agent_type_id": 5, "agent_id": 1, "time": "23:00" } }
Response
{ "Report": { "id": 4, "type_id": 2, "device_id": 9011, "agent_type_id": 5, "agent_id": 1, "time": "23:00", "modified": "1619413335948", "created": "1619413335948" } }
PUT
Updates a single specific Report.
The ID of the desired Daily Report to be updated.
{ "Report": { "type_id": 2, "device_id": 9011, "agent_type_id": 15, "agent_id": 1, "time": "05:00" } }
{ "Report": { "id": 1, "type_id": 2, "device_id": 9011, "agent_type_id": 15, "agent_id": 1, "time": "05:00", "modified": "1619414952489", "created": "1619414466172" } }
DELETE
Deletes a single specific Report configuration.
The ID of the desired Daily Report to be deleted.
http://44.235.52.211/api/2.0/reports/2/.json
{ "success": true }
Sends the specified report immediately, disregarded the configured Time.
http://{host}/api/2.0/reports/command/sendReport/{report_id}/{device_id}/.format
report_id(required)
The ID of the desired report configuration to be used to send the report.
device_id(optional)
The ID of the desired device the report will be sent from. If left blank, the report will be sent from local device.
http://44.235.52.211/api/2.0/reports/command/sendReport/1/9011/.json
{ "Task": { "id": 876136, "device_id": 9011, "type": "Send Report", "type_id": 14, "mode": "Starting", "mode_id": 1, "status": null, "description": null, "total": 0, "completed": 0, "time_remained": 0, "modified": "1617955525989" } }