Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi - REST-API - searching for information about versioned processgroups

avatar
Master Collaborator

Hi all, I want to build a flow which brings up information about all versioned processgroup on this system. What I need is:
- name of each processgroup
- version of each processgroup
- timestamp when this version was brought to this system

 

Now I tested with NiFi-REST-API but I can not find the right request to do this.
Could someone help me to get this works?
Thanks.

1 ACCEPTED SOLUTION

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
4 REPLIES 4

avatar
Expert Contributor

@justenji  It is not possible yet to get all info in one NiFi API call as you desired but you can try below call to get the versioning info about particular process group

curl -v -X GET "https://$HOSTNAME:9091/nifi-api/versions/process-groups/{id}" -H "Authorization: Bearer $TOKEN" -H "Connection: close" -k

 

Br,

Akash

avatar
Master Collaborator

@ashinde   Thanks for this information.
Tested the command with InvokeHTTP from NiFi itselfe.
So I would have to deliver a list of Processgroup-IDs to check with this request...

 

At the moment I try getting information with
https://${hostname(true)}:${NIFI_PORT}/nifi-api/process-groups/${PG_ID}/process-groups
starting with root-pg-id, split and doing the same for each therein found processgroup in a loop.

So I can get component-name, component-version, pg-id.

 

One info I still miss is timestamp when a processgroup was brought to a NiFi-instance (imported from registry) or when it was last updated (change of version).

Do you have a tip where to find this? Thanks.

avatar
Expert Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Master Collaborator

Thanks for your help @ashinde !
I see I was looking at the wrong section of rest-api.

OK I have to go on nifi rest-api section flow/history.
I will have a look on the nifi.properties but because my report is running every night I suppose the purging doesn't matter.

 

Second option you mentioned concerning when a flow was brought to registry doesn't interest... at the moment.