Support Questions
Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

template upload issue

I have upload the template in root processor group then when i click on the template is listed there. but when i delete from Nifi UI then tried to upload the same file getting 200 OK response but not listed in the template option , please help

1 ACCEPTED SOLUTION

Master Guru

@uttam kumar

Using the NiFi REST-API, i was able to upload, delete, and upload again the same template using the following commands

To upload:

curl -X POST -v -F template=@"/<path to template>/template.xml" http://<host>:<port>/nifi-api/process-groups/<UUID of process group>/templates/upload

The UUID of my template was in the response to the above command.

To delete:

curl -X DELETE -v http://<host>:<port>/nifi-api/templates/<UUID of template>

I then repeated the above to commands successfully several times.

Thanks,

Matt

View solution in original post

6 REPLIES 6

Master Guru

@uttam kumar

What version of NiFi are you running?

Is this a standalone NiFi or a NiFi cluster?

Is you NiFi secured?

Thanks,

Matt

Thanks for your reply.

1. nifi-1.1.2, 2. Nifi Standalone 3. No

Master Guru

@uttam kumar

I have been unable to reproduce what you are seeing. Just to make sure I am doing the same steps, I have detailed what i have done below: - I setup a Apache NiFi 1.1.2 standalone unsecure instance.

- With root process group selected, I uploaded a template:

15021-screen-shot-2017-05-03-at-21535-pm.png

- I then performed the following actions to upload my template.

15022-screen-shot-2017-05-03-at-23222-pm.png

- Then i deleted the template I uploaded from my NiFi

15023-screen-shot-2017-05-03-at-23406-pm.png

- After I deleted the template, I followed the same procedure above to upload the exact same template again.

This process worked for me every time. I uploaded and deleted the same template repeatedly without issue.

Am I doing the same thing you have been doing?

Thank you,

Matt

Thanks for your reply. I am using the Nifi-API for the same.

Content-Type: multipart/form-data METHOD : POST http://84.39.32.32:8080/process-groups/36e4ed20-015a-1000-0882-9092542ffd03/templates/upload choose file.

Master Guru

@uttam kumar

Using the NiFi REST-API, i was able to upload, delete, and upload again the same template using the following commands

To upload:

curl -X POST -v -F template=@"/<path to template>/template.xml" http://<host>:<port>/nifi-api/process-groups/<UUID of process group>/templates/upload

The UUID of my template was in the response to the above command.

To delete:

curl -X DELETE -v http://<host>:<port>/nifi-api/templates/<UUID of template>

I then repeated the above to commands successfully several times.

Thanks,

Matt

Master Guru

@uttam kumar

Where either of the above answers able to resolve your template issue? If you found either helpful, please accept the answer.

Thank you,

Matt