use of org.apache.nifi.web.api.entity.FlowConfigurationEntity in project nifi by apache.
the class StandardNiFiServiceFacade method getFlowConfiguration.
@Override
public FlowConfigurationEntity getFlowConfiguration() {
final FlowConfigurationDTO dto = dtoFactory.createFlowConfigurationDto(properties.getAutoRefreshInterval());
final FlowConfigurationEntity entity = new FlowConfigurationEntity();
entity.setFlowConfiguration(dto);
return entity;
}
use of org.apache.nifi.web.api.entity.FlowConfigurationEntity in project nifi by apache.
the class FlowResource method getFlowConfig.
/**
* Retrieves the configuration for the flow.
*
* @return A flowConfigurationEntity.
*/
@GET
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.APPLICATION_JSON)
@Path("config")
@ApiOperation(value = "Retrieves the configuration for this NiFi flow", response = FlowConfigurationEntity.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 = 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 getFlowConfig() {
authorizeFlow();
if (isReplicateRequest()) {
return replicate(HttpMethod.GET);
}
final FlowConfigurationEntity entity = serviceFacade.getFlowConfiguration();
return generateOkResponse(entity).build();
}
Aggregations