@JsonRequest @ApiOperation(value = "Get user", authorizations = @Authorization(value = "read_key")) @ApiResponses(value = {@ApiResponse(code = 404, message = "User does not exist.")}) @Path("/get") public CompletableFuture<User> getUser(@Named("project") RequestContext context, @ApiParam("user") Object user) { return service.getUser(context, user); }
@ApiOperation(value = "Get logs", authorizations = @Authorization(value = "master_key")) @JsonRequest @Path("/get_logs") public List<JSCodeJDBCLoggerService.LogEntry> getLogs(@Named("project") RequestContext context, @ApiParam("identifier") String identifier, @ApiParam(value = "start", required = false) Instant start, @ApiParam(value = "end", required = false) Instant end) { return loggerService.getLogs(context, start, end, "webhook." + context.project + "." + identifier); }
@ApiOperation(value = "Add data-source", authorizations = @Authorization(value = "master_key")) @Path("/add/database") @JsonRequest public SuccessMessage addDatabase(@Named("project") RequestContext context, @BodyParam CustomDataSource hook) { return service.addDatabase(context.project, hook); }
@ApiOperation(value = "Get logs", authorizations = @Authorization(value = "master_key")) @JsonRequest @Path("/get_logs") public List<JSCodeJDBCLoggerService.LogEntry> getLogs(@Named("project") RequestContext context, @ApiParam("id") int id, @ApiParam(value = "start", required = false) Instant start, @ApiParam(value = "end", required = false) Instant end) { return loggerService.getLogs(context, start, end, "custom-event-mapper." + id); }
@ApiOperation(value = "Test database", authorizations = @Authorization(value = "master_key")) @Path("/test/file") @JsonRequest public SuccessMessage testFile(@Named("project") RequestContext context, @BodyParam CustomDataSourceService.DiscoverableRemoteTable hook) { return service.testFile(context.project, hook); } }
@ApiOperation(value = "Add file data-source", authorizations = @Authorization(value = "master_key")) @Path("/add/file") @JsonRequest public SuccessMessage addFile(@Named("project") RequestContext context, @ApiParam("tableName") String tableName, @ApiParam("options") CustomDataSourceService.DiscoverableRemoteTable hook) { return service.addFile(context.project, tableName, hook); }
@JsonRequest @ApiOperation(value = "Update report", authorizations = @Authorization(value = "master_key")) @Path("/update") public ABTestingReport update(@Named("project") RequestContext context, @BodyParam ABTestingReport report) { return metadata.update(context.project, report); } }
@JsonRequest @Path("/get") @ApiOperation(value = "Get reports", tags = "rakam-ui", authorizations = @Authorization(value = "read_key")) public CustomReport get(@ApiParam("report_type") String reportType, @Named("user_id") Project project, @ApiParam(value = "name") String name) { return metadata.get(reportType, project.project, name); } }
@ApiOperation(value = "Create Pre-computed table", authorizations = @Authorization(value = "master_key") ) @JsonRequest @Path("/pre_calculate") public CompletableFuture<AbstractEventExplorer.PrecalculatedTable> createPrecomputedTable(@Named("project") RequestContext context, @BodyParam OLAPTable table) { return eventExplorer.create(context, table); }
@ApiOperation(value = "Test database", authorizations = @Authorization(value = "master_key")) @Path("/test/database") @JsonRequest public SuccessMessage testDatabase(@Named("project") RequestContext context, @ApiParam("type") String type, @ApiParam(value = "options") JDBCSchemaConfig options) { return service.testDatabase(context.project, type, options); }
@ApiOperation(value = "Schema of table in data-sources", authorizations = @Authorization(value = "read_key")) @Path("/schema/table") @JsonRequest public CompletableFuture<List<SchemaField>> schemaDatabases(@Named("project") RequestContext context, @ApiParam("schema") String schema, @ApiParam("table") String table) { return service.schemaTable(context.project, schema, table); }
@ApiOperation(value = "Add file data-source", authorizations = @Authorization(value = "master_key")) @Path("/remove/file") @JsonRequest public SuccessMessage removeFile(@Named("project") RequestContext context, @ApiParam("tableName") String tableName) { return service.removeFile(context.project, tableName); }
@ApiOperation(value = "Check lock key", authorizations = @Authorization(value = "master_key") ) @JsonRequest @Path("/lock_key") public boolean checkLockKey(@ApiParam(value = "lock_key", required = false) String lockKey) { return Objects.equals(lockKey, projectConfig.getLockKey()); }
@JsonRequest @ApiOperation(value = "Get report", authorizations = @Authorization(value = "read_key")) @Path("/get") public ABTestingReport get(@Named("project") RequestContext context, @ApiParam("id") int id) { return metadata.get(context.project, id); }
@JsonRequest @ApiOperation(value = "Test query", authorizations = @Authorization(value = "read_key")) @Path("/metadata") public CompletableFuture<List<SchemaField>> metadata(@Named("project") RequestContext context, @ApiParam("query") String query) { return executorService.metadata(context, query); }
@ApiOperation(value = "Get hook", authorizations = @Authorization(value = "master_key")) @Path("/get") @JsonRequest public WebHook get(@Named("project") RequestContext context, @ApiParam("identifier") String identifier) { return get(context.project, identifier); }
@JsonRequest @Path("/list") @ApiOperation(value = "List reports", tags = "rakam-ui", authorizations = @Authorization(value = "read_key")) public List<CustomReport> list(@ApiParam("report_type") String reportType, @Named("user_id") Project project) { return metadata.list(reportType, project.project); }
@ApiOperation(value = "Add file data-source", authorizations = @Authorization(value = "master_key")) @Path("/remove/database") @JsonRequest public SuccessMessage removeDatabase(@Named("project") RequestContext context, @ApiParam("schemaName") String schemaName) { return service.removeDatabase(context.project, schemaName); }
@JsonRequest @ApiOperation(value = "Revoke API Keys") @Path("/revoke-api-keys") public SuccessMessage revokeApiKeys(@ApiParam("project") String project, @ApiParam("master_key") String masterKey) { apiKeyService.revokeApiKeys(project, masterKey); return SuccessMessage.success(); }