Created 11-21-2024 10:03 AM
Hi,
I am trying to create json, that is always the same,
{"status":"APPROVED"}
I have used replace text, used alwaysreplace and put that text there.
Here is the specification of the invokehttp
Am I missing something?
Created 11-22-2024 03:12 AM
Hi,
It seems like the Url you have in the invokehttp is invalid compared to the one in postman:
invokehttp:
https://tolingo-portal-test.s.xtrf.eu/home-api/quotes/ZQ6BPIPYHVE2FCVQ4HASNRIU3I/status
Postman:
https://tolingo-portal-test.s.xtrf.eu/home-api/v2/quotes/ZQ6BPIPYHVE2FCVQ4HASNRIU3I/status
It seems like you are missing the v2 in invokehttp.
When I try the correct url with the following configuration it works but I dont have access ofcourse 🙂
Created 11-21-2024 11:27 AM
@bgumis Welcome to the Cloudera Community!
To help you get the best possible solution, I have tagged our NiFi experts @MattWho @SAMSAL who may be able to assist you further.
Please keep us updated on your post, and we hope you find a satisfactory solution to your query.
Regards,
Diana Torres,Created 11-21-2024 01:41 PM
Hi,
Can you elaborate more about the API call and what method its using? if you also can provide how the API works using postman or curl that would be helpful too. Just FYI, if you are trying to send json body with Get method its not going to work using this processor and you have to write custom code using ExecuteScript to work around it.
Created 11-21-2024 10:24 PM
Hi,
I am using PUT method, the URL is #{xtrf_api}/quotes/${quote_id}/status which correctly resolves itself with https://tolingo-portal-test.s.xtrf.eu/home-api/quotes/ZQ6BPIPYHVE2FCVQ4HASNRIU3I/status.
The error message is 404, <html><head><title>Error</title></head><body>Not
Found</body></html> which suggests that the json was not ingested by InvokeHTTP (as far as I understand).
When I use Postman (If there is a better way to share the results, I am happy to provide but I am still a beginner)
Created 11-22-2024 03:12 AM
Hi,
It seems like the Url you have in the invokehttp is invalid compared to the one in postman:
invokehttp:
https://tolingo-portal-test.s.xtrf.eu/home-api/quotes/ZQ6BPIPYHVE2FCVQ4HASNRIU3I/status
Postman:
https://tolingo-portal-test.s.xtrf.eu/home-api/v2/quotes/ZQ6BPIPYHVE2FCVQ4HASNRIU3I/status
It seems like you are missing the v2 in invokehttp.
When I try the correct url with the following configuration it works but I dont have access ofcourse 🙂
Created 11-22-2024 05:44 AM
@SAMSAL
Jeez... I should not have prepared that flow at the end of 12 hour work...
Of course, it works now, sorry for troubles and thanks for quick support