@GET @Path("{taskId}/results/{bufferId}/{token}/acknowledge") public void acknowledgeResults( @PathParam("taskId") TaskId taskId, @PathParam("bufferId") OutputBufferId bufferId, @PathParam("token") final long token) { requireNonNull(taskId, "taskId is null"); requireNonNull(bufferId, "bufferId is null"); taskManager.acknowledgeTaskResults(taskId, bufferId, token); }
@GET @Path("mapi/lastBars/{pairs}/{period}/{amount}") @Produces(MediaType.APPLICATION_JSON) DSXBarsWrapper getBars( @PathParam("pairs") String pairs, @PathParam("period") String period, @PathParam("amount") String amount, @DefaultValue("1") @QueryParam("ignore_invalid") int ignoreInvalid, @DefaultValue("LIVE") @QueryParam("mode") String mode) throws IOException; }
@DELETE @Path("{taskId}/results/{bufferId}") @Produces(MediaType.APPLICATION_JSON) public void abortResults(@PathParam("taskId") TaskId taskId, @PathParam("bufferId") OutputBufferId bufferId, @Context UriInfo uriInfo) { requireNonNull(taskId, "taskId is null"); requireNonNull(bufferId, "bufferId is null"); taskManager.abortTaskResults(taskId, bufferId); }
@GET @Path("/{streamRuleId}") @Timed @ApiOperation(value = "Get a single stream rules") @Produces(MediaType.APPLICATION_JSON) public StreamRule get(@ApiParam(name = "streamid", value = "The id of the stream whose stream rule we want.", required = true) @PathParam("streamid") String streamid, @ApiParam(name = "streamRuleId", value = "The stream rule id we are getting", required = true) @PathParam("streamRuleId") String streamRuleId) throws NotFoundException { checkPermission(RestPermissions.STREAMS_READ, streamid); return streamRuleService.load(streamRuleId); }
@DELETE @Path("/{dataSourceName}/segments/{segmentId}") @ResourceFilters(DatasourceResourceFilter.class) public Response deleteDatasourceSegment( @PathParam("dataSourceName") String dataSourceName, @PathParam("segmentId") String segmentId ) { if (databaseSegmentManager.removeSegment(dataSourceName, segmentId)) { return Response.ok().build(); } return Response.noContent().build(); }
@GET @Path("tables/{tableName}/segments/crc") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Gets crc of all segments of a table", notes = "Gets crc of all segments") public String getCrcForAllSegments( @ApiParam(value = "Name of the table", required = true) @PathParam("tableName") String tableName) { return getAllCrcMetadataForTable(tableName); }
@GET @Path("trades/{pairs}") @Produces(MediaType.APPLICATION_JSON) LiquiPublicTradesResult getTrades( @PathParam("pairs") Pairs pairs, @QueryParam("limit") int limit);
@DELETE @Path("{queryId}/{token}") @Produces(MediaType.APPLICATION_JSON) public Response cancelQuery(@PathParam("queryId") QueryId queryId, @PathParam("token") long token) { Query query = queries.get(queryId); if (query == null) { return Response.status(Status.NOT_FOUND).build(); } query.cancel(); return Response.noContent().build(); }
@POST @Path("/{dataSourceName}/segments/{segmentId}") @Consumes(MediaType.APPLICATION_JSON) @ResourceFilters(DatasourceResourceFilter.class) public Response enableDatasourceSegment( @PathParam("dataSourceName") String dataSourceName, @PathParam("segmentId") String segmentId ) { if (!databaseSegmentManager.enableSegment(segmentId)) { return Response.noContent().build(); } return Response.ok().build(); }
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/table/{tableName}/size") @ApiOperation(value = "Show table storage size", notes = "Lists size of all the segments of the table") @ApiResponses(value = {@ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 500, message = "Internal server error"), @ApiResponse(code = 404, message = "Table not found")}) @Deprecated public String getTableSizeOld( @ApiParam(value = "Table Name with type", required = true) @PathParam("tableName") String tableName, @ApiParam(value = "Provide detailed information") @DefaultValue("true") @QueryParam("detailed") boolean detailed) throws WebApplicationException { return this.getTableSize(tableName, detailed); } }
@GET @Path("api/3/ticker/{pairs}") @Produces(MediaType.APPLICATION_JSON) WexTickerWrapper getTicker( @PathParam("pairs") String pairs, @DefaultValue("1") @QueryParam("ignore_invalid") int ignoreInvalid) throws IOException;
@POST @Path("/{dataSourceName}") @Consumes(MediaType.APPLICATION_JSON) @ResourceFilters(DatasourceResourceFilter.class) public Response enableDataSource( @PathParam("dataSourceName") final String dataSourceName ) { if (!databaseSegmentManager.enableDataSource(dataSourceName)) { return Response.noContent().build(); } return Response.ok().build(); }
@Deprecated @GET @Path("tables/{tableName}/segments/reload") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Reloads all segments of a table", notes = "Reloads all segments") public SuccessResponse reloadAllSegmentsDeprecated( @ApiParam(value = "Name of the table", required = true) @PathParam("tableName") String tableName, @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr) { CommonConstants.Helix.TableType tableType = Constants.validateTableType(tableTypeStr); return reloadAllSegmentsForTable(tableName, tableType); }
@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 @Path("{queryId}") public Response getQueryInfo(@PathParam("queryId") QueryId queryId) { requireNonNull(queryId, "queryId is null"); try { QueryInfo queryInfo = queryManager.getFullQueryInfo(queryId); return Response.ok(queryInfo).build(); } catch (NoSuchElementException e) { return Response.status(Status.GONE).build(); } }
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/tables/{tableName}/idealstate") @ApiOperation(value = "Get table ideal state", notes = "Get table ideal state") public TableView getIdealState( @ApiParam(value = "Name of the table", required = true) @PathParam("tableName") String tableName, @ApiParam(value = "realtime|offline", required = false) @QueryParam("tableType") String tableTypeStr) { CommonConstants.Helix.TableType tableType = validateTableType(tableTypeStr); return getTableState(tableName, IDEALSTATE, tableType); }