Last Updated: 1/22/2020 12:11:13 AM
Update scheduled reports for customers
Request
HTTP Request
PUT /SMPI/{version}/service/wfbss/api/report
Parameters
Name |
Type |
Description |
Validation |
---|---|---|---|
Required Parameters |
|||
cids |
string |
A list of customer IDs separated by comma. |
At least one customer ID must be specified, and no more than 10. |
Optional Parameters |
|||
name |
string |
Report name |
Either one of name and rtid is required. |
rtid |
integer |
Report ID |
Either one of name and rtid is required. |
HTTP Request Example
1. Update the scheduled reports having the specified name PUT /SMPI/{version}/service/wfbss/api/report?cids=74AE704D-CD9E-4F45-A62B-CA3AED65F99F&name=weekly report 2. Update the scheduled report whose report ID is 1 PUT /SMPI/{version}/service/wfbss/api/report?cids=74AE704D-CD9E-4F45-A62B-CA3AED65F99F&rtid=1
Request Body
1. Update specified report to a monthly report that runs and sends out on 5th of each month, at 8:00 AM. Its contents include Virus Summary and Top 5 Devices (excluding Servers) with Virus Detections. { "type":4, "setting": { "name": "monthly_report", "enabled": 1, "parameter": { "gids": [1, 2], "address": ["user1@example.com", "user2@example.com"], "monthday": 5, "email": 1, "time": 28800, "contents": [{"tbl_type": 100}, {"tbl_type": 101}] } } } 2. Update specified report to a weekly report runs on Monday of each month, at 8:00 AM. Its contents include Virus Summary and Top 5 Devices (excluding Servers) with Virus Detections. { "type":3, "setting": { "name": "weekly_report" , "enabled": 1, "parameter": { "weekday": 1, "email": 0, "time": 28800, "contents": [{"tbl_type": 100}, {"tbl_type": 101}] } } }
Name |
Type |
Description |
Validation |
---|---|---|---|
Required Parameters |
|||
type |
integer |
Report schedule |
3 = Weekly; 4 = Monthly |
setting.name |
string |
Report name |
Cannot be blank or contain any of the following characters: \ / : ; * ? " < > | 1 |
setting.enabled |
integer |
Set weather to enable or disable |
1 = true; 0 = false |
setting.parameter.time |
integer |
The time WFBS-SVC should generate the report and the time format is the number of the second of the day. |
0 to 86399. For example, 0 indicates 00:00 AM, 28800 indicates 08:00 AM |
setting.parameter.email |
integer |
Set weather to sent out the report |
1 = True; 0 = False |
setting.parameter.contents[].tbl_type |
integer |
Select the required content for the report. |
100 = Virus Summary, 101 = Top 5 Devices (excluding Servers) with Virus Detections, 102 = Top 5 Servers with Virus Detections, 200 = Spyware/Grayware Summary, 201 = Top 5 Devices (excluding Servers) with Spyware/Grayware Detections, 202 = Top 5 Servers with Spyware/Grayware Detections, 300 = Top 10 Network Viruses Detected, 301 = Top 10 Devices Attacked by Network Viruses, 400 = Top 10 Devices Violating Web Threat Protection Policies, 500 = Top 5 Programs Violating Behavior Monitoring Policies, 501 = Top 10 Devices Violating Behavior Monitoring Policies, 600 = Top 5 URL Category Policies Violated, 601 = Top 10 Devices Violating URL Category Policies, 700 = Top 5 Programs Violating Device Control Policies, 701 = Top 10 Devices Violating Device Control Policies |
Optional Parameters |
|||
setting.parameter.weekday |
integer |
The Report runs once a week on the specified day at the specified time. This field will be required if type is set to 3. |
Required for weekly report. 0 = Sunday; 1 = Monday; 2 = Tuesday; 3 = Wednesday; 4 = Thursday; 5 = Friday; 6 = Saturday |
setting.parameter.monthday |
integer |
The Report runs once a month on the specified day at the specified time. This field will be required if type is set to 4. |
Required for monthly report. 1 to 31. However, if you select 31 days and the month has only 30 days, WFBS-SVC will not generate the report that month. |
setting.parameter.address[] |
string |
A list of email addresses, WFBS-SVC sends the generated report to the specified recipients. This field will be required if setting.parameter.email is set to 1. |
e.g., user1@example.com |
setting.parameter.gids[] |
integer |
A list of group ID. If set, creates the report for specified groups; otherwise, creates the report for all clients. |
Response
Response
If successful, this method returns an HTTP 200 OK status code and a response body with the following structure:
1. Response of the request to update report for one customer { "customers": [ { "rtid": 2, "message": "", "id": "640FE47F-5118-4D79-8221-A35D0DE2EE2C", "result": "Done", "eid": "B2C79DCE-D642-4310-A984-F82DC9051E70" } ] } 2. Response of the request to update reports for multiple customers { "customers": [ { "rtid": 2, "message": "", "id": "640FE47F-5118-4D79-8221-A35D0DE2EE2C", "result": "Done", "eid": "B2C79DCE-D642-4310-A984-F82DC9051E70" }, { "rtid": 1, "message": "", "id": "549390C2-61B3-417E-B1F0-8955A63C08F3", "result": "Done", "eid": "D8932A43-815C-4177-908C-4FE2C4BF5FF0" } ] } 3. If you call the API to update reports for multiple customers but some customer ID are invalid, the response will only contain the result for the valid Customers. For example, call the API with two valid Customer ID 640FE47F-5118-4D79-8221-A35D0DE2EE2C and 549390C2-61B3-417E-B1F0-8955A63C08F3 but one invalid Customer ID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. The response will contain the result for 640FE47F-5118-4D79-8221-A35D0DE2EE2C and 549390C2-61B3-417E-B1F0-8955A63C08F3. { "customers": [ { "rtid": 2, "message": "", "id": "640FE47F-5118-4D79-8221-A35D0DE2EE2C", "result": "Done", "eid": "B2C79DCE-D642-4310-A984-F82DC9051E70" }, { "rtid": 1, "message": "", "id": "549390C2-61B3-417E-B1F0-8955A63C08F3", "result": "Done", "eid": "D8932A43-815C-4177-908C-4FE2C4BF5FF0" } ] }
Name |
Type |
Description |
Length |
---|---|---|---|
customers[].id |
string |
Customer ID |
GUID |
customers[].eid |
string |
For internal use |
GUID |
customers[].rtid |
integer |
Report ID of the updated report |
|
customers[].result |
string |
Result |
Done = success; LimitError = over the report limit 10; SpecError = report template spec error; InternalError = other errors; Exception = unexpected exception |
customers[].message |
string |
Error message |
If customers[].result is “DONE”, it will be empty. If customers[].result is “LimitError”, it will be “over the report limit”. If customers[].result is “SpecError”, it will be “report template spec error”. Otherwise, it will show the detail error message of the unexpected exception or internal error. |