<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I am using HTTP Event Collector to post data from my application to splunk and has issues with it. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/I-am-using-HTTP-Event-Collector-to-post-data-from-my-application/m-p/428692#M94690</link>
    <description>&lt;P&gt;That's because splunk expects the outer layer of JSON to look like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
 ...
 "event": "..."
 ...
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you need to nest your actual JSON string inside the event field. See also: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/FormatEventsforHTTPEventCollector#Examples"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/FormatEventsforHTTPEventCollector#Examples&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 07:11:16 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-06-05T07:11:16Z</dc:date>
    <item>
      <title>I am using HTTP Event Collector to post data from my application to splunk and has issues with it.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-am-using-HTTP-Event-Collector-to-post-data-from-my-application/m-p/428691#M94689</link>
      <description>&lt;P&gt;I am using HTTP Event Collector to post data from my application to splunk and was able to successfully post the simple json string but in case of complex json string I am getting an error saying 400 bad request. I have given my data in the description section&lt;BR /&gt;
I am able to post the below string successfully&lt;BR /&gt;
{&lt;BR /&gt;
    "event: Abcdef, Y10EE888, EEE"&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;but I am getting the error with the below Json String &lt;BR /&gt;
{&lt;BR /&gt;
  "Student":{&lt;BR /&gt;
    "FirstName":"Abc",&lt;BR /&gt;
    "LastName":"Def",&lt;BR /&gt;
    "FlashID":"12345",&lt;BR /&gt;
    "FlashEmailID":"&lt;A href="mailto:abc@def.com"&gt;abc@def.com&lt;/A&gt;",&lt;BR /&gt;
    "StudentDegreeofEnrollment":"MS",&lt;BR /&gt;
    "StudentCourses":[&lt;BR /&gt;
      {&lt;BR /&gt;
        "CourseID":"101",&lt;BR /&gt;
        "CourseName":"SEM"&lt;BR /&gt;
      }&lt;BR /&gt;
    ],&lt;BR /&gt;
    "StudentMajor":"EE"&lt;BR /&gt;
  }&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;I am passing Authorization value and content type (application/json) in HTTP request headers. I am not able to figure out why the request was failing with 400 Bad request even the Json string is properly formatted. Any help on this is appreciated. &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 02:14:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-am-using-HTTP-Event-Collector-to-post-data-from-my-application/m-p/428691#M94689</guid>
      <dc:creator>deepu1107</dc:creator>
      <dc:date>2018-06-05T02:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: I am using HTTP Event Collector to post data from my application to splunk and has issues with it.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/I-am-using-HTTP-Event-Collector-to-post-data-from-my-application/m-p/428692#M94690</link>
      <description>&lt;P&gt;That's because splunk expects the outer layer of JSON to look like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
 ...
 "event": "..."
 ...
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you need to nest your actual JSON string inside the event field. See also: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/FormatEventsforHTTPEventCollector#Examples"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/FormatEventsforHTTPEventCollector#Examples&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 07:11:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/I-am-using-HTTP-Event-Collector-to-post-data-from-my-application/m-p/428692#M94690</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-05T07:11:16Z</dc:date>
    </item>
  </channel>
</rss>

