Class ApiController

java.lang.Object
eu.dnetlib.apps.oai.controller.ApiController

@RestController @RequestMapping("/api") public class ApiController extends Object
  • Constructor Details

    • ApiController

      public ApiController()
  • Method Details

    • startCollection

      @GetMapping("/collect") public CollectionInfo startCollection(@RequestParam String oaiBaseUrl, @RequestParam(required=false,defaultValue="oai_dc") String oaiFormat, @RequestParam(required=false) String oaiSet, @RequestParam(required=false) LocalDateTime oaiFrom, @RequestParam(required=false) LocalDateTime oaiUntil, @RequestParam(required=false,defaultValue="${oai.conf.maxRecords}") Long max, @RequestParam(required=false) String notificationEmail)
    • getCollectionInfo

      @GetMapping("/history/{id}") public CollectionInfo getCollectionInfo(@PathVariable String id)
    • history

      @GetMapping("/history") public Map<String,ExecutionStatus> history(@RequestParam(required=false,defaultValue="false") boolean all)
    • cleanHistory

      @DeleteMapping("/history") public Map<String,ExecutionStatus> cleanHistory(@RequestParam(required=false,defaultValue="false") boolean all) throws Exception
      Throws:
      Exception
    • handleException

      @ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public ApiController.ErrorMessage handleException(Exception e)