Hello Obaid,
You can go to help in NiFi and bring up the docs. Scroll down on the left hand pane to the section titled 'developer' and select REST API. The docs can also be found here https://nifi.apache.org/docs.html
From there you can select 'provenance' to get a detailed breakdown of the requests and information necessary for the requests. A really good thing to do is use Chrome's developer tools and use the NiFi UI to create requests. Then you can see precisely what is being done by NiFi's client and you can then emulate the same thing programatically.
Thanks
Joe