41 lines
1.8 KiB
Java
41 lines
1.8 KiB
Java
package eu.dnetlib.repo.manager.service.controllers;
|
|
|
|
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
|
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
|
import eu.dnetlib.repo.manager.shared.JobsOfUser;
|
|
import io.swagger.annotations.Api;
|
|
import org.json.JSONException;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
@RestController
|
|
@RequestMapping(value = "/monitor")
|
|
@Api(description = "Monitor API", tags = {"monitor"})
|
|
public interface MonitorApi {
|
|
|
|
@RequestMapping(value = "/getJobsOfUser" , method = RequestMethod.GET,
|
|
produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@ResponseBody
|
|
JobsOfUser getJobsOfUser(String user,
|
|
String jobType,
|
|
String offset,
|
|
String limit,
|
|
String dateFrom,
|
|
String dateTo,
|
|
String validationStatus,
|
|
String includeJobsTotal) throws JSONException, ValidatorServiceException;
|
|
|
|
@RequestMapping(value = "/getJobsOfUserPerValidationStatus" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@ResponseBody
|
|
int getJobsOfUserPerValidationStatus(@RequestBody String user,
|
|
@RequestBody String jobType,
|
|
@RequestBody String validationStatus) throws JSONException;
|
|
|
|
@RequestMapping(value = "/getJobSummary" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@ResponseBody
|
|
StoredJob getJobSummary(@RequestBody String jobId,
|
|
@RequestBody String groupBy) throws JSONException;
|
|
|
|
}
|