use of org.apache.nifi.web.api.entity.StatusHistoryEntity in project nifi by apache.
the class FlowResource method getConnectionStatusHistory.
/**
* Retrieves the specified connection status history.
*
* @param id The id of the connection to retrieve.
* @return A statusHistoryEntity.
* @throws InterruptedException if interrupted
*/
@GET
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.APPLICATION_JSON)
@Path("connections/{id}/status/history")
@ApiOperation(value = "Gets the status history for a connection", response = StatusHistoryEntity.class, authorizations = { @Authorization(value = "Read - /flow") })
@ApiResponses(value = { @ApiResponse(code = 400, message = "NiFi was unable to complete the request because it was invalid. The request should not be retried without modification."), @ApiResponse(code = 401, message = "Client could not be authenticated."), @ApiResponse(code = 403, message = "Client is not authorized to make this request."), @ApiResponse(code = 404, message = "The specified resource could not be found."), @ApiResponse(code = 409, message = "The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.") })
public Response getConnectionStatusHistory(@ApiParam(value = "The connection id.", required = true) @PathParam("id") String id) throws InterruptedException {
authorizeFlow();
// replicate if cluster manager
if (isReplicateRequest()) {
return replicate(HttpMethod.GET);
}
// get the specified processor status history
final StatusHistoryEntity entity = serviceFacade.getConnectionStatusHistory(id);
return generateOkResponse(entity).build();
}
Aggregations