<?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 How to use Splunk REST API to create/update a role with more than 1 index access? in Splunk Cloud Platform</title>
    <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-use-Splunk-REST-API-to-create-update-a-role-with-more/m-p/657931#M2513</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am trying to create roles via API and here is the curl request. Question I have is, I am not able to add more than 1 index to the srchIndexesAllowed field either when I create the role or when I update the role. I am not able to find any Splunk documentation around the request body. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does anyone know how I can add/update multiple indexes for a role.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location 'https://XXXXXXXXXXXXXXX/services/authorization/roles/fi_a00002-namespace_nonprod_power' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXX' \
--data-urlencode 'imported_roles=user' \
--data-urlencode 'srchIndexesAllowed=index1,index2' \
--data-urlencode 'srchIndexesDefault=index1,index2'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 19:40:16 GMT</pubDate>
    <dc:creator>premrajvs</dc:creator>
    <dc:date>2023-09-19T19:40:16Z</dc:date>
    <item>
      <title>How to use Splunk REST API to create/update a role with more than 1 index access?</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-use-Splunk-REST-API-to-create-update-a-role-with-more/m-p/657931#M2513</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to create roles via API and here is the curl request. Question I have is, I am not able to add more than 1 index to the srchIndexesAllowed field either when I create the role or when I update the role. I am not able to find any Splunk documentation around the request body. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does anyone know how I can add/update multiple indexes for a role.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl --location 'https://XXXXXXXXXXXXXXX/services/authorization/roles/fi_a00002-namespace_nonprod_power' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXX' \
--data-urlencode 'imported_roles=user' \
--data-urlencode 'srchIndexesAllowed=index1,index2' \
--data-urlencode 'srchIndexesDefault=index1,index2'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 19:40:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-use-Splunk-REST-API-to-create-update-a-role-with-more/m-p/657931#M2513</guid>
      <dc:creator>premrajvs</dc:creator>
      <dc:date>2023-09-19T19:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Splunk REST API to create/update a role with more than 1 index access?</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-use-Splunk-REST-API-to-create-update-a-role-with-more/m-p/695442#M3181</link>
      <description>&lt;P&gt;Trying the same here, getting an error while having the proper permissions:&lt;BR /&gt;{"messages":[{"type":"ERROR","text":"Current user doesn't have permission to add index test"}]}&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 16:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-use-Splunk-REST-API-to-create-update-a-role-with-more/m-p/695442#M3181</guid>
      <dc:creator>jalecrim_decat</dc:creator>
      <dc:date>2024-08-06T16:40:21Z</dc:date>
    </item>
  </channel>
</rss>

