<?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: Splunk Stream: How to configure streams using REST API? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284599#M33836</link>
    <description>&lt;P&gt;hi. The Splunk Stream REST API docs have been updated with new request/response examples, parameter information, etc., for each operation. To use the /streams endpoint to create, modify, and delete streams, see: &lt;A href="http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI#Streams"&gt;http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI#Streams&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;HTH. &lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2017 20:49:12 GMT</pubDate>
    <dc:creator>sroback_splunk</dc:creator>
    <dc:date>2017-02-13T20:49:12Z</dc:date>
    <item>
      <title>Splunk Stream: How to configure streams using REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284598#M33835</link>
      <description>&lt;P&gt;Hello Splunkers&lt;/P&gt;

&lt;P&gt;There is a partial REST API documentation.&lt;BR /&gt;
There is a lot of information missing.&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI"&gt;http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;We are really interested in configuring our streams using the REST API.&lt;BR /&gt;
Especially, since we are unable to use the SDK, because we are using python3.&lt;/P&gt;

&lt;P&gt;Current, urgent use case&lt;BR /&gt;
We want to create, modify and delete streams&lt;/P&gt;

&lt;P&gt;Greetings&lt;BR /&gt;
Mathias&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 17:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284598#M33835</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2017-02-10T17:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Stream: How to configure streams using REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284599#M33836</link>
      <description>&lt;P&gt;hi. The Splunk Stream REST API docs have been updated with new request/response examples, parameter information, etc., for each operation. To use the /streams endpoint to create, modify, and delete streams, see: &lt;A href="http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI#Streams"&gt;http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI#Streams&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;HTH. &lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 20:49:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284599#M33836</guid>
      <dc:creator>sroback_splunk</dc:creator>
      <dc:date>2017-02-13T20:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Stream: How to configure streams using REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284600#M33837</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;What I don't understand yet is how do I get the tokens&lt;BR /&gt;
The /streams/ GET command comments&lt;BR /&gt;
    The cookies and x-splunk-form-key can be obtained from the GET request's response headers.&lt;/P&gt;

&lt;P&gt;But when I run it I only get&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ curl -i -k https://localhost:8000/en-US/custom/splunk_app_stream/streams/test
HTTP/1.1 404 Not Found
Date: Wed, 15 Feb 2017 14:35:14 GMT
Content-Type: text/json;charset=utf-8
X-Content-Type-Options: nosniff
Content-Length: 337
Vary: Cookie
Connection: Keep-Alive
X-Frame-Options: SAMEORIGIN
Set-Cookie: session_id_8000=ee2f22f1c69a96be792938a883934b541b503d89; expires=Thu, 16 Feb 2017 14:35:10 GMT; httponly; Path=/; secure
Server: Splunkd

{"status": 404, "error": "Stream with specified id not found", "success": false}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I assume that I can just take the sessionID for the cookie so&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkd_8000=ee2f22f1c69a96be792938a883934b541b503d89
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when I look at the POST command I also need&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;splunkweb_csrf_token_8000=&lt;/LI&gt;
&lt;LI&gt;X-Splunk-Form-Key: &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Where do I get these from?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:53:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284600#M33837</guid>
      <dc:creator>mathiask</dc:creator>
      <dc:date>2020-09-29T12:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Stream: How to configure streams using REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284601#M33838</link>
      <description>&lt;P&gt;Hi. Just FYI: &lt;BR /&gt;
The Stream REST API docs have been updated with instructions on how to generate the required tokens. See:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI#How_to_generate_tokens"&gt;http://docs.splunk.com/Documentation/StreamApp/7.0.1/DeployStreamApp/SplunkAppforStreamRESTAPI#How_to_generate_tokens&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 03:37:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284601#M33838</guid>
      <dc:creator>sroback_splunk</dc:creator>
      <dc:date>2017-02-23T03:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Stream: How to configure streams using REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284602#M33839</link>
      <description>&lt;P&gt;A splunkd endpoint (Rest API) resides on port 8089 by default. In order to access these from code running in the browser, it needs to be “expose” setting in $SPLUNK_HOME/etc/system/default/web.conf. Or else it gives cross-origin prevention and CSRF protections in the browser.&lt;BR /&gt;
To resolve this you are trying to send tokens for &lt;CODE&gt;splunkweb_csrf_token_8000, splunkd_8000 and session_id_8000&lt;/CODE&gt;.&lt;BR /&gt;
Actually these token are saved in your browser as cookies when u login to splunk web browser.&lt;BR /&gt;
U need not to explicitly send in the request header. In turn, the browser will send these tokens in request header. U can see this in network section of browser.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Stream-How-to-configure-streams-using-REST-API/m-p/284602#M33839</guid>
      <dc:creator>sumangala</dc:creator>
      <dc:date>2020-09-29T14:04:40Z</dc:date>
    </item>
  </channel>
</rss>

