title: nifi invokehttp post complex json
body: <p>I trying to use InvokeHttpProcessor in Apache NiFi to perform POST request with complex JSON body.
  Accordingly this tutorial: <a href="http://www.tomaszezula.com/2016/10/30/nifi-and-http-post-configuration" rel="nofollow noreferrer">http://www.tomaszezula.com/2016/10/30/nifi-and-http-post-configuration</a></p>
  
  <p>I know how to use <strong>UpdateAttribute</strong> processor to add name/value pairs and then apply an additional transformation via <strong>AttributesToJSON</strong>.</p>
  
  <p>But how to deal with complex JSON?
  For example I have to perform request to GoogleAnalytics reporting API, so I need to perform this request:</p>
  
  <pre><code>POST https://analyticsreporting.googleapis.com/v4/reports:batchGet
  
  {
    "reportRequests":
    [
      {
        "viewId": "XXXX",
        "dateRanges": [{"startDate": "2014-11-01", "endDate": "2014-11-30"}],
        "metrics": [{"expression": "ga:users"}]
      }
    ]
  }
  </code></pre>
  
  <p>any ideas?</p>