Refine search
@GET @Path("mapi/trades/{pairs}") @Produces(MediaType.APPLICATION_JSON) DSXTradesWrapper getTrades( @PathParam("pairs") String pairs, @DefaultValue("150") @QueryParam("limit") int limit, @DefaultValue("1") @QueryParam("ignore_invalid") int ignoreInvalid, @DefaultValue("LIVE") @QueryParam("mode") String mode) throws IOException;
@GET @ApiOperation(value = "Get the cluster traffic stats") public TrafficCounterService.TrafficHistogram get(@ApiParam(name = "days", value = "For how many days the traffic stats should be returned") @QueryParam("days") @DefaultValue("30") int days, @ApiParam(name = "daily", value = "Whether the traffic should be aggregate to daily values") @QueryParam("daily") @DefaultValue("false") boolean daily) { final TrafficCounterService.TrafficHistogram trafficHistogram = trafficCounterService.clusterTrafficOfLastDays(Duration.standardDays(days), daily ? TrafficCounterService.Interval.DAILY : TrafficCounterService.Interval.HOURLY); return trafficHistogram; } }
@POST @Path("trade_history/{ident}/{currency}/") CexIOTrade[] getTradesSince( @PathParam("ident") String tradeableIdentifier, @PathParam("currency") String currency, @DefaultValue("1") @FormParam("since") long since) throws IOException;
@Path("start") @POST public Response post(@DefaultValue("0") @QueryParam("testSources") int testSources, @Context Sse sse) { final Process process = new Process(testSources, sse); processes.put(process.getId(), process); Executors.newSingleThreadExecutor().execute(process); final URI processIdUri = UriBuilder.fromResource(DomainResource.class).path("process/{id}").build(process.getId()); return Response.created(processIdUri).build(); }
/** * Reload the graphs for all registered routerIds from disk. */ @RolesAllowed({ "ROUTERS" }) @PUT @Produces({ MediaType.APPLICATION_JSON }) public Response reloadGraphs(@QueryParam("path") String path, @QueryParam("preEvict") @DefaultValue("true") boolean preEvict, @QueryParam("force") @DefaultValue("true") boolean force) { otpServer.getGraphService().reloadGraphs(preEvict, force); return Response.status(Status.OK).build(); }
@Deprecated @POST @Path("dwapi") @FormParam("method") DSXCryptoDepositAddressReturn getCryptoDepositAddress( @HeaderParam("Key") String apiKey, @HeaderParam("Sign") ParamsDigest signer, @FormParam("nonce") SynchronizedValueFactory<Long> nonce, @FormParam("currency") String currency, @DefaultValue("0") @FormParam("newAddress") int newAddress) throws IOException;
} else { if (value == null && (ann = anns.get(DefaultValue.class)) != null) { value = ((DefaultValue) ann).value(); newTarget = newTarget.resolveTemplate(((PathParam) ann).value(), value); } else if ((ann = anns.get((QueryParam.class))) != null) { if (value instanceof Collection) { newTarget = newTarget.queryParam(((QueryParam) ann).value(), convert((Collection) value)); } else { newTarget = newTarget.queryParam(((QueryParam) ann).value(), value); produces = proxyIfc.getAnnotation(Produces.class); final String[] accepts = (produces == null) ? EMPTY : produces.value();
paramEncoded = true; } else if (DefaultValue.class == annotation.annotationType()) { paramDefault = ((DefaultValue) annotation).value(); } else {
@GET public Response getWav(@QueryParam("toneSequence") String toneSequence, @DefaultValue("300") @QueryParam("toneDuration") int toneDuration, @DefaultValue("300") @QueryParam("silenceDuration") int silenceDuration) { File file; try { file = new File(ToneGenerator.generate(toneSequence, toneDuration, silenceDuration)); } catch (LineUnavailableException e) { throw new WebApplicationException(e); } catch (IOException e) { throw new WebApplicationException(e); } return Response.ok(file, "audio/wav").build(); }
@POST @Path("/{dataSourceName}") @Consumes(MediaType.APPLICATION_JSON) @ResourceFilters(RulesResourceFilter.class) public Response setDatasourceRules( @PathParam("dataSourceName") final String dataSourceName, final List<Rule> rules, @HeaderParam(AuditManager.X_DRUID_AUTHOR) @DefaultValue("") final String author, @HeaderParam(AuditManager.X_DRUID_COMMENT) @DefaultValue("") final String comment, @Context HttpServletRequest req ) { if (databaseRuleManager.overrideRule( dataSourceName, rules, new AuditInfo(author, comment, req.getRemoteAddr()) )) { return Response.ok().build(); } return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); }
@Path("start") @POST public Response post(@DefaultValue("0") @QueryParam("testSources") int testSources) { final Process process = new Process(testSources); processes.put(process.getId(), process); Executors.newSingleThreadExecutor().execute(process); final URI processIdUri = UriBuilder.fromResource(DomainResource.class).path("process/{id}").build(process.getId()); return Response.created(processIdUri).build(); }
boolean encode = findAnnotation(annotations, Encoded.class) != null || injectTarget.isAnnotationPresent(Encoded.class) || type.isAnnotationPresent(Encoded.class); String defaultVal = null; if (defaultValue != null) defaultVal = defaultValue.value(); return new QueryParamInjector(type, genericType, injectTarget, queryParam.value(), defaultVal, encode, annotations, providerFactory); return new PathParamInjector(type, genericType, injectTarget, uriParam.value(), defaultVal, encode, annotations, providerFactory);
@GET @Path("api/3/depth/{pairs}") @Produces(MediaType.APPLICATION_JSON) WexDepthWrapper getDepth( @PathParam("pairs") String pairs, @DefaultValue("150") @QueryParam("limit") int limit, @DefaultValue("1") @QueryParam("ignore_invalid") int ignoreInvalid) throws IOException;
@GET @Timed @ApiOperation(value = "Get the most recent alarms of all streams.") @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ObjectId.") }) public AlertListSummary listRecent(@ApiParam(name = "since", value = "Optional parameter to define a lower date boundary. (UNIX timestamp)", required = false) @QueryParam("since") @DefaultValue("0") @Min(0) int sinceTs, @ApiParam(name = "limit", value = "Maximum number of alerts to return.", required = false) @QueryParam("limit") @DefaultValue("300") @Min(1) int limit) throws NotFoundException { final DateTime since = new DateTime(sinceTs * 1000L, DateTimeZone.UTC); final List<AlertSummary> alerts = getAlertSummaries(alertService.loadRecentOfStreams(getAllowedStreamIds(), since, limit).stream()); return AlertListSummary.create(alerts.size(), alerts); }
paramEncoded = true; } else if (DefaultValue.class == annotation.annotationType()) { paramDefault = ((DefaultValue) annotation).value(); } else {
@GET @Path("mapi/depth/{pairs}") @Produces(MediaType.APPLICATION_JSON) DSXOrderbookWrapper getOrderbook( @PathParam("pairs") String pairs, @DefaultValue("1") @QueryParam("ignore_invalid") int ignoreInvalid, @DefaultValue("LIVE") @QueryParam("mode") String mode) throws IOException;
@GET @Timed public JsonTesterResponse get(@QueryParam("string") @NotEmpty String string, @QueryParam("flatten") @DefaultValue("false") boolean flatten, @QueryParam("list_separator") @NotEmpty String listSeparator, @QueryParam("key_separator") @NotEmpty String keySeparator, @QueryParam("replace_key_whitespace") boolean replaceKeyWhitespace, @QueryParam("key_whitespace_replacement") String keyWhitespaceReplacement, @QueryParam("key_prefix") String keyPrefix, @QueryParam("kv_separator") @NotEmpty String kvSeparator) { return testJsonExtractor(string, flatten, listSeparator, keySeparator, kvSeparator, replaceKeyWhitespace, keyWhitespaceReplacement, keyPrefix); }
paramEncoded = true; } else if (DefaultValue.class == annotation.annotationType()) { paramDefault = ((DefaultValue) annotation).value(); } else {