<?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: How to write dynamic rest api script in Shell?? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-dynamic-rest-api-script-in-Shell/m-p/498659#M84980</link>
    <description>&lt;P&gt;This is the fire eye API telling you that fromLastModifiedOn is invalid OR its value is invalid.&lt;/P&gt;

&lt;P&gt;This is a splunk forum, so I recommend you post this to fire eyes community instead.  You might find expertise here or you might not.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 12:44:40 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2020-01-31T12:44:40Z</dc:date>
    <item>
      <title>How to write dynamic rest api script in Shell??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-dynamic-rest-api-script-in-Shell/m-p/498658#M84979</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I was writing one script in shell for getting data though rest api . &lt;/P&gt;

&lt;P&gt;Below is the connect of the script &lt;BR /&gt;
`#!/bin/bash&lt;/P&gt;

&lt;H1&gt;remove old files from driectory&lt;/H1&gt;

&lt;P&gt;rm /opt/splunk/etc/apps/HUM_QA_FIREEYE_INPUTS/bin/fireeye_alert.json&lt;/P&gt;

&lt;P&gt;date_time=$(date +'%Y-%d-%m''T''%H'':00:00.000')&lt;BR /&gt;
retieve data for fireeye_alert&lt;BR /&gt;
curl -s -X POST -k -H 'Content-Type: application/json' -H "x-fireeye-api-key:some_unique_value" &lt;A href="https://abc.com" target="_blank"&gt;https://abc.com&lt;/A&gt; -d '{"fromLastModifiedOn":"$date_time","size": 10}' &amp;gt;&amp;gt; /opt/splunk/etc/apps/HUM_QA_FIREEYE_INPUTS/bin/fireeye_aler`&lt;/P&gt;

&lt;P&gt;Here , I have scheduled this script to run every hour and every time it run , it will create a new date_time value which we need to give in the curl command as argument . The problem is , I am not getting any data if I use this script . There is some error with fromLastModifiedOn coming.&lt;/P&gt;

&lt;P&gt;ERROR :&lt;BR /&gt;
{&lt;BR /&gt;
  "message": "Incorrect request params: fromLastModifiedOn. Enter the valid request params and without any space"&lt;BR /&gt;
}&lt;/P&gt;

&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:57:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-dynamic-rest-api-script-in-Shell/m-p/498658#M84979</guid>
      <dc:creator>pal_sumit1</dc:creator>
      <dc:date>2020-09-30T03:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to write dynamic rest api script in Shell??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-write-dynamic-rest-api-script-in-Shell/m-p/498659#M84980</link>
      <description>&lt;P&gt;This is the fire eye API telling you that fromLastModifiedOn is invalid OR its value is invalid.&lt;/P&gt;

&lt;P&gt;This is a splunk forum, so I recommend you post this to fire eyes community instead.  You might find expertise here or you might not.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 12:44:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-write-dynamic-rest-api-script-in-Shell/m-p/498659#M84980</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-01-31T12:44:40Z</dc:date>
    </item>
  </channel>
</rss>

