<?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 tell when it's safe to query the API about a newly created user? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490354#M83825</link>
    <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/565493/is-there-a-cli-command-for-debug-refresh.html"&gt;https://answers.splunk.com/answers/565493/is-there-a-cli-command-for-debug-refresh.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;From above... try this:&lt;/P&gt;

&lt;P&gt;curl -u admin  -X POST &lt;A href="https://localhost:8089/servicesNS/-/-/admin/savedsearch/_reload"&gt;https://localhost:8089/servicesNS/-/-/admin/savedsearch/_reload&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 17:13:00 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2020-05-04T17:13:00Z</dc:date>
    <item>
      <title>How to tell when it's safe to query the API about a newly created user?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490350#M83821</link>
      <description>&lt;P&gt;When using SSO with clustered search heads, users who lose SSO access leave behind knowledge objects and directories on the file system. I'm doing some work to clean these up. In order to be able to query the Splunk API for the full set of information, it's necessary to re-create the user so that Splunk will see and return information about their private knowledge objects. While doing this, I noticed the following problem:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;I can ask the API about the knowledge objects owned by a user via /servicesNS/-/-/admin/directory&lt;/LI&gt;
&lt;LI&gt;However, if I ask about saved searches from /servicesNS/USERNAME/search/saved/searches/SEARCH_NAME, I get a 404 for searches that are present in (1)&lt;/LI&gt;
&lt;LI&gt;After 5-10 seconds, (2) begins to work&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I suspected that maybe the search head cluster needs to sync some configuration, so I hit /services/shcluster/status while (2) is failing repeatedly to get some info about the search head cluster state. None of the search heads specify they are out of sync, and the last conf replication time reset (indicating a configuration replication had happened), but the API was still returning 404s on saved searches for a few seconds.&lt;/P&gt;

&lt;P&gt;Is there any way to know when it's "safe" to request information pertaining to a user? Is the /directory endpoint potentially affected by this? Are there other endpoints that may be affected in the same way?&lt;/P&gt;

&lt;P&gt;One other thing I tested was querying /servicesNS/-/search/saved/searches/SEARCH_NAME, however it exhibited the same behavior. Not all users seem to behave this way, but the particular user in question had a couple knowledge objects of type "props-extract". It seems likely that re-adding those to the system is taking longer, and this added delay somehow affects their saved searches showing up. &lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 15:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490350#M83821</guid>
      <dc:creator>krisreeves</dc:creator>
      <dc:date>2020-05-03T15:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell when it's safe to query the API about a newly created user?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490351#M83822</link>
      <description>&lt;P&gt;You should be able to hit /debug/refresh first then the endpoint you're looking for.  In SHC, if you're aiming directly at one server versus querying a load balancer VIP you shouldn't have to worry about propagation.&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2020 22:03:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490351#M83822</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-05-03T22:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell when it's safe to query the API about a newly created user?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490352#M83823</link>
      <description>&lt;P&gt;All my testing was against a single host (no load balancer involved) from localhost, which is why I'm puzzled. By propagation, I was thinking that perhaps once the user is enabled, some system process needed to atomically update the cluster (due to the props-extract configs, which none of the other users that seem to work fine have) before it would "activate", much like cluster bundle config pushes, and that I was hitting things before that happened.&lt;/P&gt;

&lt;P&gt;I'll see if /debug/refresh makes a difference tomorrow, since the problem seems to be consistently reproducible with this one particular user.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 06:22:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490352#M83823</guid>
      <dc:creator>krisreeves</dc:creator>
      <dc:date>2020-05-04T06:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell when it's safe to query the API about a newly created user?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490353#M83824</link>
      <description>&lt;P&gt;(update)&lt;/P&gt;

&lt;P&gt;/debug/refresh is a web ui thing, not a REST API thing. I found the comment below this answer: &lt;A href="https://answers.splunk.com/answering/661816/view.html"&gt;https://answers.splunk.com/answering/661816/view.html&lt;/A&gt; and gave it a try, but the same behavior is still exhibited (I have to retry multiple times to get the expected data)&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 16:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490353#M83824</guid>
      <dc:creator>krisreeves</dc:creator>
      <dc:date>2020-05-04T16:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell when it's safe to query the API about a newly created user?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490354#M83825</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/565493/is-there-a-cli-command-for-debug-refresh.html"&gt;https://answers.splunk.com/answers/565493/is-there-a-cli-command-for-debug-refresh.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;From above... try this:&lt;/P&gt;

&lt;P&gt;curl -u admin  -X POST &lt;A href="https://localhost:8089/servicesNS/-/-/admin/savedsearch/_reload"&gt;https://localhost:8089/servicesNS/-/-/admin/savedsearch/_reload&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 17:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490354#M83825</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-05-04T17:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to tell when it's safe to query the API about a newly created user?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490355#M83826</link>
      <description>&lt;P&gt;That's exactly what I did. "I found the comment below this answer  and gave it a try"&lt;BR /&gt;
It didn't help &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 19:10:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-tell-when-it-s-safe-to-query-the-API-about-a-newly/m-p/490355#M83826</guid>
      <dc:creator>krisreeves</dc:creator>
      <dc:date>2020-05-04T19:10:14Z</dc:date>
    </item>
  </channel>
</rss>

