Created 02-05-2018 05:58 AM
For example I want to get the ID of the process-gorup which is at root level by asking the following query http://localhost:9090/nifi-api/process-groups/root/process-groups?name=Process-group1
The problem I am facing here is this results as all the processor group that are available at root level.But I'm only interested in the particular process-group.How can I get that information only not about all processor group?
Created 02-05-2018 06:18 PM
By using restApi search url you can get the id of the process group
RestApi URL:-
curl -i -X GET http://localhost:9090/nifi-api/flow/search-results?q=<name(or)id>;
Example:-
I'm having flowfiledrop as the name of process group in my NiFi and to get the id of the flowfiledrop process group ,
RestApi url would be
curl -i -X GET http://localhost:9090/nifi-api/flow/search-results?q=flowfiledrop
As you can see in i've mentioned flowfiledrop process group name in q parameter
$ curl -i -X GET http://localhost:9090/nifi-api/flow/search-results?q=flowfiledrop HTTP/1.1 200 OK Date: Mon, 05 Feb 2018 18:10:03 GMT X-Frame-Options: SAMEORIGIN Cache-Control: private, no-cache, no-store, no-transform Content-Type: application/json Vary: Accept-Encoding Vary: User-Agent Content-Length: 336 Server: Jetty(9.4.3.v20170317)
{"searchResultsDTO":{"processorResults":[],"connectionResults":[],"processGroupResults":[{"id":"619a2801-0161-1000-a4c2-95e4430e977f","groupId":"3b738dba-0161-1000-c808-f7d38f21fcab","name":"flowfiledrop","matches":["Name: flowfiledrop"]}],"inputPortResults":[],"outputPortResults":[],"remoteProcessGroupResults":[],"funnelResults":[]}}
the id of the flowfile drop process group is 619a2801-0161-1000-a4c2-95e4430e977f.
.
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of errors.
Created 02-05-2018 06:18 PM
By using restApi search url you can get the id of the process group
RestApi URL:-
curl -i -X GET http://localhost:9090/nifi-api/flow/search-results?q=<name(or)id>;
Example:-
I'm having flowfiledrop as the name of process group in my NiFi and to get the id of the flowfiledrop process group ,
RestApi url would be
curl -i -X GET http://localhost:9090/nifi-api/flow/search-results?q=flowfiledrop
As you can see in i've mentioned flowfiledrop process group name in q parameter
$ curl -i -X GET http://localhost:9090/nifi-api/flow/search-results?q=flowfiledrop HTTP/1.1 200 OK Date: Mon, 05 Feb 2018 18:10:03 GMT X-Frame-Options: SAMEORIGIN Cache-Control: private, no-cache, no-store, no-transform Content-Type: application/json Vary: Accept-Encoding Vary: User-Agent Content-Length: 336 Server: Jetty(9.4.3.v20170317)
{"searchResultsDTO":{"processorResults":[],"connectionResults":[],"processGroupResults":[{"id":"619a2801-0161-1000-a4c2-95e4430e977f","groupId":"3b738dba-0161-1000-c808-f7d38f21fcab","name":"flowfiledrop","matches":["Name: flowfiledrop"]}],"inputPortResults":[],"outputPortResults":[],"remoteProcessGroupResults":[],"funnelResults":[]}}
the id of the flowfile drop process group is 619a2801-0161-1000-a4c2-95e4430e977f.
.
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of errors.
Created 02-06-2018 05:44 AM
Thanks a lot
Created 11-16-2018 06:44 PM
Very helpful! Thanks @Shu.
Also, be sure to put %20 in place of spaces in the search query.
Created 02-13-2019 11:30 PM
Thanks for your answer @Shu ! It is very helpful.
Is there a way to do wildcard search using this?
Created 02-13-2019 11:31 PM
Thanks for your answer @Shu ! It is very helpful.
Is there a way to do wildcard search using this?