How to post the template into NIFI from local drive using Postman? - hortonworks-data-platform

I have using 0.6.1 binary source.
I am new to nifi rest api.
How to post the templates from local drive into NIFI UI using Rest API in windows?

You can upload templates from Postman using the following settings:
Method: POST
Request URL: http://yournifiserver:8080/nifi-api/controller/templates
Body:
Select form-data
Add key/value pair with key template, set the value type to file and browse for your local file.
Then Send.

Related

To send file as attachment using HTTP request node in IIB

I have requirement to send a file over API as attachment. This works fine from Postman. I have to implement same using IIB using HTTP Request Node. I am not able to find any property on the node related to attachment. Can anyone suggest the solution
I want to implement this binary file upload option via HTTP request node
I assume there is already a published API that you are sending that attachment to it and you want to develop some interface from IIB to mask this API , Correct ? If it is correct then all what you need is to set the HTTPRequest Node to work in the gateway operation mode then you will have to specify the URL of the published API and of course an HTTPInput node in the beginning of the flow.

How to upload a image to azure using jmeter given the webservice in JSON format

JSON webservice is provided. How to upload a image to azure using jmeter given the webservice in JSON format.
I have to add JSON web service to Jmeter manually. It works in POSTMAN to uplaod a file to Azure container. Same webservice is required to be added in Jmeter manually. I am stuck at a point in Jmeter where Upload file path (local) could be provided, but the destination parameter how to provide. MIME Type can be given. Also, complete JSON body if provided in Jmeter then How to add file manually with the request. Please guide. Inputs I have is URL & Json body structure. And, I have to pass image with this request in Jmeter so that I can go ahead with performance test further.
In order to get a comprehensive answer you need to include the request format your Azure endpoint expects.
In easier cases it is just enough to record your file upload event using HTTP(S) Test Script Recorder - just make sure to copy your .json file to "bin" folder of your JMeter installation prior to uploading so JMeter could detect it.
In harder cases you will need to construct your request manually like it's described in Testing REST API File Uploads in JMeter article, the example assumes using Google Drive REST API however you should be able to adapt it to your needs.

Update a Google Sheet Using HTTP Request in Postman

I have a server needing to update a shared Google Sheet. It generates special tokens for offline use so doesn't work with PHP quickstart module.
I am trying to setup request in Postman for this action:
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update
But get the following result:
Is it possible to use HTTP for this API?
Turns out I had to add ?valueInputOption=RAW on the end of my URL request and removed valueInputOption from the request body JSON.
The valueInputOption should be passed as params to the POST URL, it should not be in the request body.
Also the sheetID and the range should be sent in the URL.
I suppose it should be a POST call not PUT.

Apache Nifi : How to pass post params and capture response from post API - traditional non rest, non json API

I'm trying to pull data from a post API that expects authentication and request parameters as part of the request body. I guess, what they do is access the data from the post variables.
What I have seen so far in documentation is how to send POST via JSON or headers. In my case, no headers just the post body parameters.
call to this api via curl --data option works just fine.
curl --data "username=xyz&password=xyz&function=xyz" http://example.com/api.php
How can I replicate above call in nifi?
I have tried multiple methods without success. Latest has been Generate flow file, update attributes (where i fill in the parameters), invoke http then putfile.
But I'm getting errors - the api is not abe to authenticate my request.
Thanks
If you need to send the following data in body, then put it into content of your flowfile.
username=xyz&password=xyz&function=xyz
The easiest way to put it into the Custom Text property of the GenerateFlowFile processor.
Usually for this kind of body you have to provide content type header:
content-type: application/x-www-form-urlencoded
If you don't need any additional headers then you don't have to define any additional attributes of the flow file.

How to create task without using Rally.RestApi.dll in C#?

I am trying consume rally REST web service in Windows Phone app. I successfully fetched data using this url "https://rally1.rallydev.com/slm/webservice/1.36/task?query=((Owner.Name = {0}) and (State != Completed))&order=Rank&fetch=true&stylesheet=/slm/doc/webservice/browser.xsl" and using Ling to Xml I am able to read data. However I am not able to consume Create, Update and Delete operation. Can someone share the code to consume these below service in C#
Create PUT/POST
XML https://rally1.rallydev.com/slm/webservice/1.37/task/create
JSON https://rally1.rallydev.com/slm/webservice/1.37/task/create.js
Update POST
XML https: //rally1.rallydev.com/slm/webservice/1.37/task/ObjectID
JSON https: //rally1.rallydev.com/slm/webservice/1.37/task/ObjectID.js
Delete DELETE
XML https: //rally1.rallydev.com/slm/webservice/1.37/task/ObjectID
JSON https: //rally1.rallydev.com/slm/webservice/1.37/task/ObjectID.js
Thanks,
Sunil
Try RestSharp it supports all the HTTP operations and is available for Windows Phone 7.

Resources