<?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 .json file as input in a POST call to the REST API in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-json-file-as-input-in-a-POST-call-to-the-REST-API/m-p/468905#M80683</link>
    <description>&lt;P&gt;Im trying to update a role in our environment via the Splunk REST API and Im using POSTMAN like app with an input file which is holding several changes in parameters for the specified role.&lt;BR /&gt;The post call looks like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;POST &lt;A href="https://localhost:8089/services/authorization/roles/rl_user" target="test_blank"&gt;https://localhost:8089/services/authorization/roles/rl_user&lt;/A&gt;
Authorization: Bearer xxx

&amp;lt; ...\input.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And this is the content of the input file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;srchIndexesAllowed=main;srchJobsQuota=3;srchDiskQuota=300
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Even though this is working quite fine, editing the input file manually like this is really unpractical.&lt;BR /&gt;What I would like to know is whether there is an option to first call the API to export the role in atom(xml)/json format.&lt;BR /&gt;Take that export, update the values I need and then import the file again via a POST API call to change the params?&lt;/P&gt;
&lt;P&gt;I`ve been playing with this for quite some time but no luck.&lt;BR /&gt;Any advise is appreciated.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 00:04:01 GMT</pubDate>
    <dc:creator>tomaskucerak</dc:creator>
    <dc:date>2020-06-07T00:04:01Z</dc:date>
    <item>
      <title>How to use .json file as input in a POST call to the REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-json-file-as-input-in-a-POST-call-to-the-REST-API/m-p/468905#M80683</link>
      <description>&lt;P&gt;Im trying to update a role in our environment via the Splunk REST API and Im using POSTMAN like app with an input file which is holding several changes in parameters for the specified role.&lt;BR /&gt;The post call looks like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;POST &lt;A href="https://localhost:8089/services/authorization/roles/rl_user" target="test_blank"&gt;https://localhost:8089/services/authorization/roles/rl_user&lt;/A&gt;
Authorization: Bearer xxx

&amp;lt; ...\input.txt
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And this is the content of the input file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;srchIndexesAllowed=main;srchJobsQuota=3;srchDiskQuota=300
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Even though this is working quite fine, editing the input file manually like this is really unpractical.&lt;BR /&gt;What I would like to know is whether there is an option to first call the API to export the role in atom(xml)/json format.&lt;BR /&gt;Take that export, update the values I need and then import the file again via a POST API call to change the params?&lt;/P&gt;
&lt;P&gt;I`ve been playing with this for quite some time but no luck.&lt;BR /&gt;Any advise is appreciated.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 00:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-json-file-as-input-in-a-POST-call-to-the-REST-API/m-p/468905#M80683</guid>
      <dc:creator>tomaskucerak</dc:creator>
      <dc:date>2020-06-07T00:04:01Z</dc:date>
    </item>
  </channel>
</rss>

