Leave a comment at the end of this page or email contact@krishagni.com
How to schedule Login Audit Report
Important
The below wiki-page is outdated. This can be done via UI (from v5.2) please follow this wiki-page ('Scheduling Jobs' section) for instructions to do this via UI.
Login Audit Report job can be scheduled using the REST API.
Please refer document REST API Invoker to use the REST API invoker plugin in OpenSpecimen.
Steps to change the schedule of Login Audit Report:
Resource URI: rest/ng/scheduled-jobs?query=Monthly Login Audit Report
Get the details of the report job by the GET request method.
The output of will of the GET request will be in JSON format as shown below
[ { "id": 11, "name": "Monthly Login Audit Report", "createdBy": { "id": 2, "firstName": "System", "lastName": null, "loginName": "$system", "domain": "openspecimen", "emailAddress": "$system", "instituteName": null, "admin": true, "instituteAdmin": false, "manageForms": false, "cpCount": 0, "creationDate": null }, "startDate": 1500540722000, "endDate": null, "scheduledHour": 0, "scheduledMinute": 40, "scheduledDayOfWeek": "SATURDAY", "scheduledDayOfMonth": null, "nextRunOn": 1514785200786, "activityStatus": "Active", "repeatSchedule": "WEEKLY", "type": "INTERNAL", "taskImplFqn": "com.krishagni.openspecimen.audit.service.impl.LoginAuditReportGenerator", "command": null, "recipients": [], "isActiveJob": true, "lastRunOn": null, "rtArgsProvided": false, "rtArgsHelpText": null } ]Below are the attributes which need to be sent in the request body:
To set the desired schedule of the job, change the above fields in JSON and use the PUT method request using resource URI: rest/ng/scheduled-jobs/{id of job} and send the changed JSON in the request body.
Example:
Error cases :
Status code | Applies to | Status messages |
|---|---|---|
200 | All resources | Job has been updated successfully |
400 | All requests | Invalid parameters, e.g duplicate institute name, blank institute name, etc |
401 | All requests | Authorization failed, the user doesn’t have authority |
404 | All requests | Job not found, institute with given details not present in the system |
500 | All requests | Internal server error, encountered server error while performing operations |
Leave a comment at the end of this page or email contact@krishagni.com