use of org.apache.nifi.web.api.entity.ProvenanceOptionsEntity in project nifi by apache.
the class ProvenanceResource method getSearchOptions.
/**
* Gets the provenance search options for this NiFi.
*
* @return A provenanceOptionsEntity
*/
@GET
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.APPLICATION_JSON)
@Path("search-options")
@ApiOperation(value = "Gets the searchable attributes for provenance events", response = ProvenanceOptionsEntity.class, authorizations = { @Authorization(value = "Read - /provenance") })
@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 getSearchOptions() {
authorizeProvenanceRequest();
if (isReplicateRequest()) {
return replicate(HttpMethod.GET);
}
// get provenance search options
final ProvenanceOptionsDTO searchOptions = serviceFacade.getProvenanceSearchOptions();
// create the response entity
final ProvenanceOptionsEntity entity = new ProvenanceOptionsEntity();
entity.setProvenanceOptions(searchOptions);
// generate the response
return noCache(Response.ok(entity)).build();
}
Aggregations