Member since
07-19-2023
3
Posts
2
Kudos Received
0
Solutions
03-12-2024
04:43 AM
1 Kudo
Thanks we were able to import the templates using the api calls curl -X POST -H "Content-Type: multipart/form-data" -H "Authorization: Bearer $bearer" -F "template=@/root/api_testing/template.xml" https://host-ip:host-port/nifi-api/process-groups/process-group-id/templates/upload -k First we need to upload the template from local as it generates a id for the template which we can use for importing the template into the canvas For importing the template curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $bearer" -d '{"templateId":"template-id","originX":100,"originY":100}' https://host-ip:host-port/nifi-api/process-groups/process-group-id/template-instance -k
... View more
03-12-2024
03:12 AM
1 Kudo
Hi @ckumar Is there any way (api call) to directly import the templates into the nifi canvas /process-groups/{id}/templates/import we got this api call in the nifi api doc doc - https://nifi.apache.org/docs/nifi-docs/rest-api/index.html This is not working for us Thanks
... View more
03-11-2024
11:54 PM
Hi Team, We have a usescase wherein we want to import the templates directly into nifi canvas using the rest apis provided by nifi we are hitting with the below error. If anyone faced this issue previously please assisst. we are able to upload, download but import is not working To get the token bearer=$(curl 'https://nifi-host:nifi-port/nifi-api/access/token' --data 'username=username&password=password' --compressed --insecure) To import the template curl -i -X -k POST -H "Content-Type: application/xml" -H "Authorization: Bearer $bearer" -F "template=@/root/tmp/template.xml" https://nifi-host:nifi-port/nifi-api/process-groups/processor-group-id/templates/import Nifi version - 1.8.0.3.3.1.0-10 error - HTTP 400 Bad Request Thanks
... View more
Labels:
- Labels:
-
Apache NiFi