use of org.wso2.ei.dashboard.micro.integrator.delegates.CarbonAppsDelegate in project product-mi-tooling by wso2.
the class GroupsApi method getCarbonApplicationsByNodeIds.
@GET
@Path("/{group-id}/capps")
@Produces({ "application/json" })
@Operation(summary = "Get carbon applications by node ids", description = "", tags = { "carbonApplications" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of carbon applications deployed in provided nodes", content = @Content(schema = @Schema(implementation = Artifacts.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getCarbonApplicationsByNodeIds(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @NotNull @QueryParam("nodes") @Parameter(description = "ID/IDs of the nodes") List<String> nodes) {
CarbonAppsDelegate cappsDelegate = new CarbonAppsDelegate();
Artifacts cappList = cappsDelegate.getArtifactsList(groupId, nodes);
Response.ResponseBuilder responseBuilder = Response.ok().entity(cappList);
HttpUtils.setHeaders(responseBuilder);
return responseBuilder.build();
}
use of org.wso2.ei.dashboard.micro.integrator.delegates.CarbonAppsDelegate in project product-mi-tooling by wso2.
the class GroupsApi method getCarbonApplicationArtifactsByNodeIds.
@GET
@Path("/{group-id}/nodes/{node-id}/capps/{capp-name}/artifacts")
@Produces({ "application/json" })
@Operation(summary = "Get artifact list of carbon application by node id", description = "", tags = { "carbonApplications" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of artifacts in carbon applications deployed in provided nodes", content = @Content(schema = @Schema(implementation = CAppArtifacts.class))), @ApiResponse(responseCode = "200", description = "Unexpected error", content = @Content(schema = @Schema(implementation = Error.class))) })
public Response getCarbonApplicationArtifactsByNodeIds(@PathParam("group-id") @Parameter(description = "Group ID of the node") String groupId, @PathParam("node-id") @Parameter(description = "Node ID") String nodeId, @PathParam("capp-name") @Parameter(description = "Carbon application name") String cappName) throws ManagementApiException {
CarbonAppsDelegate cappsDelegate = new CarbonAppsDelegate();
CAppArtifacts cAppArtifactList = cappsDelegate.getCAppArtifactList(groupId, nodeId, cappName);
Response.ResponseBuilder responseBuilder = Response.ok().entity(cAppArtifactList);
HttpUtils.setHeaders(responseBuilder);
return responseBuilder.build();
}
Aggregations