<?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: Python - ReSave Splunk (existing) Knowledge Objects without any changes in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/586643#M9531</link>
    <description>&lt;P&gt;I also have been having "issues" , i have created a utility in python to extract all KO's for a list ( lookup table ) of users. It will clone all KO's to a designated target app. It works well for all objects until we decided to add a "disable source" option. This revealed that "global" objects were not truly being cloned but "acting" as if they are....&lt;/P&gt;&lt;P&gt;A part of the process calls the target to see if it already exists... This is always true for a "global" object returning no 404 error but instead a full result but examining past the atom links the ['entry'][0]['links'] all point back to the original app links....&amp;nbsp; I can even disable the source and enable the target .... a disaster waiting to happen. If I move the target app ( to the cloud for instance ) it has NONE of the relevant attribute to function ... like the base search ...&lt;/P&gt;&lt;P&gt;Is there any FULL documentation to the /move links since adding 'sharing'= app or global does not stop a new private object being created....&amp;nbsp; (as is suggested in Splunk rest doc's but the examples are VERY simplistic&lt;/P&gt;</description>
    <pubDate>Fri, 25 Feb 2022 17:59:34 GMT</pubDate>
    <dc:creator>mwk1000</dc:creator>
    <dc:date>2022-02-25T17:59:34Z</dc:date>
    <item>
      <title>Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530771#M9526</link>
      <description>&lt;P&gt;I have a task to move All users (except admins, nobody) KOs (Knowledge Objects) from search app, to their own apps.&lt;BR /&gt;When I try to move the KO, I get below error.&lt;/P&gt;&lt;PRE&gt;Replication-related issue: Cannot move asset lacking a pre-existing asset ID&lt;/PRE&gt;&lt;P&gt;Online search shows, work around for this.&lt;BR /&gt;We just re-save the splunk KO and them move it (to other app).&lt;BR /&gt;But problem is we have thousands of splunk KOs. There is no way we can manually do this.&lt;/P&gt;&lt;P&gt;I tired to automate with python script.&lt;BR /&gt;I did not see rest endpoint "/save" or /re-save&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Endpoints for Views:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;    &amp;lt;link href="/servicesNS/admin/search/data/ui/views/my_dashboard" rel="list"/&amp;gt;
    &amp;lt;link href="/servicesNS/admin/search/data/ui/views/my_dashboard/_reload" rel="_reload"/&amp;gt;
    &amp;lt;link href="/servicesNS/admin/search/data/ui/views/my_dashboard" rel="edit"/&amp;gt;
    &amp;lt;link href="/servicesNS/admin/search/data/ui/views/my_dashboard" rel="remove"/&amp;gt;
    &amp;lt;link href="/servicesNS/admin/search/data/ui/views/my_dashboard&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;/move&lt;/FONT&gt;&lt;/STRONG&gt;" rel="move"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;I see /move but not /save.&lt;/P&gt;&lt;P&gt;Need help, finding rest endpoint, so that I can script (The save, with &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NO changes&lt;/STRONG&gt;&lt;/FONT&gt; and Move), for all Splunk KOs (Savedsearches, Views, Eventtypes, etc...) for users.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 07:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530771#M9526</guid>
      <dc:creator>vamsigurram</dc:creator>
      <dc:date>2020-11-25T07:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530775#M9527</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214764"&gt;@vamsigurram&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe you can simply move below two directories to user app folder $SPLUNK_HOME/etc/users/users/&amp;lt;username&amp;gt;/search/local/ #place where user KO's are saved if they are private.&lt;/P&gt;&lt;P&gt;$SPLUNK_HOME/etc/users/users/&amp;lt;username&amp;gt;/search/metadata/ #place where permissions are maintained.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 08:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530775#M9527</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-11-25T08:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530944#M9528</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;&amp;nbsp;We have 30 search heads in the backend.&lt;/P&gt;&lt;P&gt;Moving hundreds of users local and meta folders, is giving us pause.&lt;BR /&gt;I am still leaning towards doing this through python script.&lt;/P&gt;&lt;P&gt;If we can do it (save Knowledge Object, without making any changes) from UI, then we should be able to do it, through REST endpoint.&lt;BR /&gt;Is there a way to see, what underlying endpoints, splunk UI is calling?&lt;BR /&gt;May be that will give us some pointers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 06:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530944#M9528</guid>
      <dc:creator>vamsigurram</dc:creator>
      <dc:date>2020-11-26T06:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530946#M9529</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214764"&gt;@vamsigurram&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try moving one user object from UI and check in below two log files if you see any GET/POST requests:&lt;/P&gt;&lt;P&gt;/opt/splunk/var/log/splunk/splunkd_ui_access.log&lt;BR /&gt;/opt/splunk/var/log/splunk/web_access.log&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 07:02:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/530946#M9529</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-11-26T07:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/531216#M9530</link>
      <description>&lt;P&gt;This code seems to&amp;nbsp; be working.&lt;/P&gt;&lt;P&gt;Assigning same existing KO's owner and sharing details, in the payload is saving the splunk KO.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;headers&amp;nbsp;=&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"content-type"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"application/x-www-form-urlencoded"&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;n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p;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;res&amp;nbsp;=&amp;nbsp;requests.post(url,&lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;&lt;SPAN&gt;=headers,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;=payload,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;verify&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 28 Nov 2020 03:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/531216#M9530</guid>
      <dc:creator>vamsigurram</dc:creator>
      <dc:date>2020-11-28T03:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/586643#M9531</link>
      <description>&lt;P&gt;I also have been having "issues" , i have created a utility in python to extract all KO's for a list ( lookup table ) of users. It will clone all KO's to a designated target app. It works well for all objects until we decided to add a "disable source" option. This revealed that "global" objects were not truly being cloned but "acting" as if they are....&lt;/P&gt;&lt;P&gt;A part of the process calls the target to see if it already exists... This is always true for a "global" object returning no 404 error but instead a full result but examining past the atom links the ['entry'][0]['links'] all point back to the original app links....&amp;nbsp; I can even disable the source and enable the target .... a disaster waiting to happen. If I move the target app ( to the cloud for instance ) it has NONE of the relevant attribute to function ... like the base search ...&lt;/P&gt;&lt;P&gt;Is there any FULL documentation to the /move links since adding 'sharing'= app or global does not stop a new private object being created....&amp;nbsp; (as is suggested in Splunk rest doc's but the examples are VERY simplistic&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 17:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/586643#M9531</guid>
      <dc:creator>mwk1000</dc:creator>
      <dc:date>2022-02-25T17:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Python - ReSave Splunk (existing) Knowledge Objects without any changes</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/587072#M9532</link>
      <description>&lt;P&gt;Solved- after some trial and error the user was being fed in to the call since it was a required attribute BUT that triggers a user level save (private ) using "nobody" keeps it in the app...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 17:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-ReSave-Splunk-existing-Knowledge-Objects-without-any/m-p/587072#M9532</guid>
      <dc:creator>mwk1000</dc:creator>
      <dc:date>2022-03-01T17:50:10Z</dc:date>
    </item>
  </channel>
</rss>

