@GET @ApiOperation( value = "Find all clusters in a project", response = Cluster.class, responseContainer = ResourceList.CLASS_NAME) @ApiResponses(value = {@ApiResponse(code = 200, message = "List of clusters in the project")}) public Response find(@Context Request request, @PathParam("id") String projectId) throws ExternalException { return generateResourceListResponse( Response.Status.OK, clusterFeClient.find(projectId), (ContainerRequest) request, ClusterResourceRoutes.CLUSTERS_PATH); }
@POST @ApiOperation(value = "Create a cluster in a project", response = Task.class) @ApiResponses( value = { @ApiResponse( code = 201, message = "A task is created to track cluster creation progress and result.") }) public Response create( @Context Request request, @PathParam("id") String projectId, @Validated ClusterCreateSpec spec) throws ExternalException { return generateCustomResponse( Response.Status.CREATED, clusterFeClient.create(projectId, spec), (ContainerRequest) request, TaskResourceRoutes.TASK_PATH); }