Search in sources :

Example 1 with ProxyServiceDelegate

use of org.wso2.ei.dashboard.micro.integrator.delegates.ProxyServiceDelegate in project product-mi-tooling by wso2.

the class GroupsApi method getProxyServicesByNodeIds.

@GET
@Path("/{group-id}/proxy-services")
@Produces({ "application/json" })
@Operation(summary = "Get proxy services by node ids", description = "", tags = { "proxyServices" })
@ApiResponses(value = { @ApiResponse(responseCode = "200", description = "List of proxy services 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 getProxyServicesByNodeIds(@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) {
    ProxyServiceDelegate proxyServiceDelegate = new ProxyServiceDelegate();
    Artifacts proxyList = proxyServiceDelegate.getArtifactsList(groupId, nodes);
    Response.ResponseBuilder responseBuilder = Response.ok().entity(proxyList);
    HttpUtils.setHeaders(responseBuilder);
    return responseBuilder.build();
}
Also used : Response(javax.ws.rs.core.Response) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) CAppArtifacts(org.wso2.ei.dashboard.core.rest.model.CAppArtifacts) Artifacts(org.wso2.ei.dashboard.core.rest.model.Artifacts) ProxyServiceDelegate(org.wso2.ei.dashboard.micro.integrator.delegates.ProxyServiceDelegate) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponses(io.swagger.v3.oas.annotations.responses.ApiResponses)

Aggregations

Operation (io.swagger.v3.oas.annotations.Operation)1 ApiResponse (io.swagger.v3.oas.annotations.responses.ApiResponse)1 ApiResponses (io.swagger.v3.oas.annotations.responses.ApiResponses)1 Response (javax.ws.rs.core.Response)1 Artifacts (org.wso2.ei.dashboard.core.rest.model.Artifacts)1 CAppArtifacts (org.wso2.ei.dashboard.core.rest.model.CAppArtifacts)1 ProxyServiceDelegate (org.wso2.ei.dashboard.micro.integrator.delegates.ProxyServiceDelegate)1