Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to pass request body to InvokeHTTP POST Request

avatar
New Contributor

Hello All,
I am trying to post the POST request (REST API) through Invoke HTTP process, for post request it requires two attributes one as part of HTTP Headers & other as Request Body which is JSON in key value format. Below are the attributes which I am trying to pass:

1)HTTP Header Attribute: This I am defining as Flowfile attribute which are converted as HTTP Headers.
2)Here is the data which has to sent as body of the request,
input_data= {
"request": {
"subject": "aaaaa",
"description": "aaaa",
"requester": {
"id": "1",
"name": "admin"
},
"impact_details": "aaaaa",
"resolution": {
"content": "aaaa"
},
"status": {
"name": "Open"
}
}
}

Approached followed : GenerateFlowFile(property)->ReplaceText->InvokeHTTP
Error (No-Retry):{"response_status":{"status_code":4000,"messages":[{"status_code":4001,"field":"input_data","type":"failed","message":"Value not provided"}],"status":"failed"}}

0 REPLIES 0