@GetMapping("/signin") public String login(@RequestParam(value = "error", required = false) String error, @RequestParam(value = "logout", required = false) String logout) { return "login.html"; }
/** * env -> cluster -> cluster has not published namespace? * Example: * dev -> * default -> true (default cluster has not published namespace) * customCluster -> false (customCluster cluster's all namespaces had published) */ @GetMapping("/apps/{appId}/namespaces/publish_info") public Map<String, Map<String, Boolean>> getNamespacesPublishInfo(@PathVariable String appId) { return namespaceService.getNamespacesPublishInfo(appId); }
@GetMapping("/envs/{env}/instances/by-namespace") public PageDTO<InstanceDTO> getByNamespace(@PathVariable String env, @RequestParam String appId, @RequestParam String clusterName, @RequestParam String namespaceName, @RequestParam(required = false) String instanceAppId, @RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "20") int size) { return instanceService.getByNamespace(Env.valueOf(env), appId, clusterName, namespaceName, instanceAppId, page, size); }
@ApiOperation(value = "Returns the details of a road") @ApiResponses({ @ApiResponse(code = 200, message = "Details of a road returned successfully.", response = StandardResponse.class), @ApiResponse(code = 400, message = "Invalid request or road name.", response = StandardResponse.class), @ApiResponse(code = 404, message = "Road not found.", response = StandardResponse.class) }) @GetMapping("/{name}") public RoadModel getRoad(@ApiParam(name = "name", value = "road name", required = true) @PathVariable String name) throws UnknownRoadException { return service.getRoad(name); }
@GetMapping(path = "/resourceServer", produces = {MediaType.APPLICATION_JSON_VALUE}) @ApiOperation(value = "Returns the list of resource servers", response = ResourceServers.class, notes = "Fetches and returns resource server descriptions.") @ApiResponses(value = {@ApiResponse(code = 200, message = "Ok")}) public ResponseEntity<ResourceServers> loadResourceServers() { ResourceServers servers = resourceServerService.getAll(); return ResponseEntity.ok(servers); }
@GetMapping("/{accountId}/balances") @ApiOperation(value="Read balances", notes="Returns balances of the deposit account with the given accountId. " + "User must have access to the target account. This is also accessible to other token types like tpp token (DELEGATED_ACESS)", authorizations =@Authorization(value="apiKey")) @ApiResponses(value={ @ApiResponse(code=200, response=AccountBalanceTO[].class, message="List of accounts balances for the given account.") }) ResponseEntity<List<AccountBalanceTO>> getBalances( @ApiParam(ACCOUNT_ID) @PathVariable(name="accountId") String accountId) throws NotFoundRestException, ForbiddenRestException;
@GetMapping(value = "/json/{appId}/{clusterName}/{namespace:.+}") public ResponseEntity<String> queryConfigAsJson(@PathVariable String appId, @PathVariable String clusterName, @PathVariable String namespace, @RequestParam(value = "dataCenter", required = false) String dataCenter, @RequestParam(value = "ip", required = false) String clientIp, HttpServletRequest request, HttpServletResponse response) throws IOException { String result = queryConfig(ConfigFileOutputFormat.JSON, appId, clusterName, namespace, dataCenter, clientIp, request, response); if (result == null) { return NOT_FOUND_RESPONSE; } return new ResponseEntity<>(result, jsonResponseHeaders, HttpStatus.OK); }
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()") @GetMapping("/server/config/{key:.+}") public ServerConfig loadServerConfig(@PathVariable String key) { return serverConfigRepository.findByKey(key); }
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()") @GetMapping(value = "/health") public Health checkHealth(@RequestParam String host) { return restTemplate.getForObject(host + "/health", Health.class); }
@ApiOperation(value = "Lists all road names") // The array of api responses is required. Without it, documentation is not generated correctly in paths.md file. @ApiResponses({ @ApiResponse(code = 200, message = "List of all road names", response = StandardResponse.class) }) @GetMapping public SortedSet<String> listRoads(HttpServletRequest req) { return service.getRoadNames(); }
@ApiOperation(value = "获取图片资源",response = byte[].class,produces = "application/json;charset=UTF-8") @ApiResponses({ @ApiResponse(code=404,message="没有找到该图片") }) @GetMapping(value = ApiConf.get_img,produces = "image/jpeg;image/png;image/gif") public ResponseEntity<byte[]> gainImg(@PathVariable("dir")String dir, @PathVariable("picName") String picName) { return hybridService.gainPic(dir,picName); }
@GetMapping("/envs/{env}/instances/by-release") public PageDTO<InstanceDTO> getByRelease(@PathVariable String env, @RequestParam long releaseId, @RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "20") int size) { return instanceService.getByRelease(Env.valueOf(env), releaseId, page, size); }
@GetMapping("/bookings/{booking}") public Object getBooking(@PathVariable Long booking) { return "url"; } }
@GetMapping("/favorites") public List<Favorite> findFavorites(@RequestParam(value = "userId", required = false) String userId, @RequestParam(value = "appId", required = false) String appId, Pageable page) { return favoriteService.search(userId, appId, page); }
@GetMapping("/me") @ApiOperation(value="Current User", notes="Retrieves the current usder." + "<ul>" + "<li>The idetifying information (userId=accessToken.sub) is implied from the security context information</li>" + "<li>Will send back a 500 if the token is valid and the user is not found. This rather means that the user has been deleted since producing this token in a preceeding step might have implied the existence of the user.</li>" + "</ul>", authorizations =@Authorization(value="apiKey")) @ApiResponses(value={ @ApiResponse(code=200, response=UserTO.class, message="The user data record without the user pin."), @ApiResponse(code=401, message="Provided bearer token could not be verified.") }) ResponseEntity<UserTO> getUser();
@GetMapping("/{accountId}") @ApiOperation(value="Load Account by AccountId", notes="Returns account details information for the given account id. " + "User must have access to the target account. This is also accessible to other token types like tpp token (DELEGATED_ACESS)", authorizations =@Authorization(value="apiKey")) @ApiResponses(value={ @ApiResponse(code=200, response=AccountDetailsTO.class, message="Account details.") }) ResponseEntity<AccountDetailsTO> getAccountDetailsById( @ApiParam(ACCOUNT_ID) @PathVariable(name="accountId") String accountId) throws NotFoundRestException, ForbiddenRestException;
@GetMapping("/envs/{env}/instances/by-namespace-and-releases-not-in") public List<InstanceDTO> getByReleasesNotIn(@PathVariable String env, @RequestParam String appId, @RequestParam String clusterName, @RequestParam String namespaceName, @RequestParam String releaseIds) { Set<Long> releaseIdSet = RELEASES_SPLITTER.splitToList(releaseIds).stream().map(Long::parseLong) .collect(Collectors.toSet()); if (CollectionUtils.isEmpty(releaseIdSet)) { throw new BadRequestException("release ids can not be empty"); } return instanceService.getByReleasesNotIn(Env.valueOf(env), appId, clusterName, namespaceName, releaseIdSet); }
@GetMapping("/bookings/{booking}") public String getBooking(@PathVariable Long booking) { return "url"; } }
@GetMapping("/users") public List<UserInfo> searchUsersByKeyword(@RequestParam(value = "keyword") String keyword, @RequestParam(value = "offset", defaultValue = "0") int offset, @RequestParam(value = "limit", defaultValue = "10") int limit) { return userService.searchUsers(keyword, offset, limit); }
@ApiOperation("Return user manager view") @ApiResponses({@ApiResponse(code = 200, message = "Return the user manager view")}) @GetMapping public String init(Model model) { model.addAttribute("users", this.pluginUserManagerService.getAllUsers()); return "view-usermanager"; }