<?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: debug refresh or _bump using REST API in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351235#M42433</link>
    <description>&lt;P&gt;Update now available here &lt;A href="https://splunkbase.splunk.com/app/1871/"&gt;https://splunkbase.splunk.com/app/1871/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Thu, 20 Sep 2018 21:15:38 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2018-09-20T21:15:38Z</dc:date>
    <item>
      <title>debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351229#M42427</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Is there any way to use debug/refresh or _bump Splunk using API. I have tried the &lt;STRONG&gt;&lt;A href="https://apps.splunk.com/app/1871/" target="_blank"&gt;https://apps.splunk.com/app/1871/&lt;/A&gt;&lt;/STRONG&gt; app/code but it doesn't seem to be working on Splunk 7.0. I have kept a file in appserver/static folder which gets changed occasionally but Splunk always sends the cached old version until we refresh/_bump/restart.&lt;/P&gt;

&lt;P&gt;I have tried running the following rest API without success&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;https://splunk3:8089/servicesNS/nobody/search/admin/myapp/_reload
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am also open to using python request.post to send the refresh command. But it asks for username/passsword which I don't want users to provide app/script. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;http://splunk3:8000/debug/refresh -d splunk_form_key=5401708645855026883
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do we have any option to send this command with a sessionkey instead of credentials like in REST API ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:56:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351229#M42427</guid>
      <dc:creator>ramesh_babu71</dc:creator>
      <dc:date>2020-09-29T17:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351230#M42428</link>
      <description>&lt;P&gt;Try this endpoint: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/RESTREF/RESTsystem#server.2Fcontrol.2Frestart_webui"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/RESTREF/RESTsystem#server.2Fcontrol.2Frestart_webui&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;using the code from the above &lt;A href="https://apps.splunk.com/app/1871/"&gt;TA&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt;&amp;gt; target="server/control/restart_webui"
&amp;gt;&amp;gt;&amp;gt; response, content = rest.simpleRequest(target, sessionKey=sessionKey, method='POST')
&amp;gt;&amp;gt;&amp;gt; response
{'expires': 'Thu, 26 Oct 1978 00:00:00 GMT', 'date': 'Wed, 07 Feb 2018 03:51:03 GMT', 'cache-control': 'no-store, no-cache, must-revalidate, max-age=0', 'content-type': 'text/xml; charset=UTF-8', 'x-frame-options': 'SAMEORIGIN', 'server': 'Splunkd', 'status': '200', 'x-content-type-options': 'nosniff', 'content-length': '2174', 'connection': 'Close', 'vary': 'Authorization'}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This does achieve the desired result of refreshing static content, though it does restart the UI which will impact users.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 14:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351230#M42428</guid>
      <dc:creator>pongc</dc:creator>
      <dc:date>2018-02-07T14:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351231#M42429</link>
      <description>&lt;P&gt;What I use to refresh or reload an app is a python script on the command line. It could obviously be tweaked to be automated using stored credentials, but for my purposes, I only use when developing to update when I make changes.&lt;/P&gt;

&lt;P&gt;Here's the script in it's entirety:&lt;BR /&gt;
    import sys&lt;BR /&gt;
    import splunklib.client as client&lt;BR /&gt;
    import getpass&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunkServer = raw_input('Enter the splunk server: ')
splunkAdmin = raw_input('Enter Splunk Admin: ')
splunkPassword = getpass.getpass('Enter Splunk Password: ')
splunkDestApp = raw_input('Enter target App Context: ')
if splunkDestApp:
    splunkService = client.connect(host=splunkServer, port=8089, username=splunkAdmin, password=splunkPassword, app=splunkDestApp)
else:
    splunkService = client.connect(host=splunkServer, port=8089, username=splunkAdmin, password=splunkPassword)

print('Refreshing app entity...')

applications = splunkService.apps

for app in applications:
    if splunkDestApp:
        if app.name == splunkDestApp:
            try:
                #app.refresh()
                app.reload()
                print(splunkDestApp+' has been refreshed')
            except  EntityDeletedException:
                print('Application '+splunkDestApp+' does not exist.')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The gist is, it prompts for the server and credentials and then which app is to be reloaded.  I run it using:&lt;BR /&gt;
    &amp;gt;splunk cmd python scriptname.py&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 17:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351231#M42429</guid>
      <dc:creator>seegeekrun</dc:creator>
      <dc:date>2018-04-30T17:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351232#M42430</link>
      <description>&lt;P&gt;Hi ramesh_babu71,&lt;/P&gt;

&lt;P&gt;creator of the mentioned app here, there will be soon an update to the app released which works on Splunk 7.1.x. It also features the option to only reload one specific entity.&lt;/P&gt;

&lt;P&gt;Link to the app: &lt;A href="https://splunkbase.splunk.com/app/1871/#/details"&gt;https://splunkbase.splunk.com/app/1871/#/details&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Sat, 18 Aug 2018 04:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351232#M42430</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-08-18T04:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351233#M42431</link>
      <description>&lt;P&gt;Thanks Michael  for the update. &lt;/P&gt;

&lt;P&gt;I do see an entry in the add-on download page &lt;BR /&gt;
&lt;STRONG&gt;18. August 2018 : 2.3.0 - added entity option&lt;/STRONG&gt;&lt;BR /&gt;
but new version is not available for download yet. Can you share a tentative date on when the new version will be available for download ?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Ramesh&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351233#M42431</guid>
      <dc:creator>ramesh_babu71</dc:creator>
      <dc:date>2018-08-21T19:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351234#M42432</link>
      <description>&lt;P&gt;Nope, since this has to go through the app certification process and this can take time ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351234#M42432</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-08-21T19:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: debug refresh or _bump using REST API</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351235#M42433</link>
      <description>&lt;P&gt;Update now available here &lt;A href="https://splunkbase.splunk.com/app/1871/"&gt;https://splunkbase.splunk.com/app/1871/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 21:15:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/debug-refresh-or-bump-using-REST-API/m-p/351235#M42433</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-09-20T21:15:38Z</dc:date>
    </item>
  </channel>
</rss>

