If you are looking to work with Templates programmatically, then I suggest
you look at my Python client NiPyApi -https://github.com/Chaffelson/nipyapi

There is a module for doing all the usual template commands:
https://nipyapi.readthedocs.io/en/latest/nipyapi-docs/nipyapi.html#module-nipyapi.templates
And modules for doing most other things, including working with
NiFi-Registry.

This way you do not have to worry about the mechanics of understanding how
the NiFi REST Api works, you can just get on with your automation.

On Wed, Sep 26, 2018 at 10:52 PM Andy LoPresto <alopre...@apache.org> wrote:

> I would recommend you perform the actions you want to replicate in your
> browser using the UI, and have the Developer Tools window open at the same
> time. You can monitor all the requests to the API that way, and even copy
> the request as a curl command, etc. This should make it much easier for you
> to build the API requests you want.
>
>
> Andy LoPresto
> alopre...@apache.org
> *alopresto.apa...@gmail.com <alopresto.apa...@gmail.com>*
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Sep 26, 2018, at 1:20 PM, l vic <lvic4...@gmail.com> wrote:
>
> Any idea how to actually instantiate the template after upload?
>
> On Thu, Sep 20, 2018 at 12:53 PM Bryan Bende <bbe...@gmail.com> wrote:
>
>> The REST API documentation [1] for the method you are using says:
>>
>> Name    Location  Type      Description
>> id           path        string     The process group id.
>>
>> [1] https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
>> On Thu, Sep 20, 2018 at 12:49 PM l vic <lvic4...@gmail.com> wrote:
>> >
>> > yes, the "id" must actually be "groupId", then it works... As usual,
>> Nifi documentation is vague or misleading
>> >
>> > On Thu, Sep 20, 2018 at 12:38 PM Bryan Bende <bbe...@gmail.com> wrote:
>> >>
>> >> That means there is no process group with the id you specified.
>> >> On Thu, Sep 20, 2018 at 12:36 PM l vic <lvic4...@gmail.com> wrote:
>> >> >
>> >> > yes, in this case i see another error:
>> >> >
>> >> > Unable to locate group with id
>> '46f95fe5-3024-31d8-0000-000000000000'.ma6219-mac:deploy
>> >> >
>> >> >
>> >> > On Thu, Sep 20, 2018 at 9:58 AM Bryan Bende <bbe...@gmail.com>
>> wrote:
>> >> >>
>> >> >> The URL you specified is not the correct path, it is missing
>> "process-groups".
>> >> >>
>> >> >>
>> http://10.10.100.105:8080/nifi-api/process-groups/f2ae3d20-e105-37a1-0000-000000000000/templates/upload
>> >> >> On Wed, Sep 19, 2018 at 4:17 PM l vic <lvic4...@gmail.com> wrote:
>> >> >> >
>> >> >> > Hi,
>> >> >> > I have template for the processing group "test-template.xml" with
>> >> >> > id=f2ae3d20-e105-37a1-0000-000000000000
>> >> >> > that I am trying to upload from my mac
>> >> >> >
>> >> >> > curl -iv -F template=@test-template.xml -X POST
>> http://10.10.100.105:8080/nifi-api/f2ae3d20-e105-37a1-0000-000000000000/templates/upload
>> >> >> >
>> >> >> >
>> >> >> > I see http error:
>> >> >> >
>> >> >> >
>> >> >> > The specified resource could not be found.ma6219-mac:deploy
>> >> >> >
>> >> >> >
>> >> >> > Any idea what the problem is with my command?
>> >> >> >
>> >> >> > Thanks ,
>> >> >> >
>> >> >> > -V
>>
>
>

Reply via email to