<?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: DBConnect: How to Edit DB Connections via REST API? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/DBConnect-How-to-Edit-DB-Connections-via-REST-API/m-p/640968#M78964</link>
    <description>&lt;P&gt;The solution that I found for this is to use the PUT method instead of a POST and to go to the endpoint specific to the connection.&lt;/P&gt;&lt;P&gt;For example to change "myparam":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -X PUT -u "admin":"changeit" --url https://localhost:8089/servicesNS/nobody/splunk_app_db_connect/db_connect/dbxproxy/connections/myconnection -d "{\"name\":\"myconnection\",\"identity\":\"myid\",\"connection_type\":\"mytype\",\"myparam\":\"new_value\"}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"myconnection" being the name of the connection you want to modify.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to put the name, identity and connection_type parameters otherwise it will throw an error. Also you cannot modify them.&lt;/P&gt;&lt;P&gt;It also works for &lt;STRONG&gt;editing Identities&lt;/STRONG&gt; and this time you have to put the name and username parameters :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -X PUT -u "admin":"changeit" --url https://localhost:8089/servicesNS/nobody/splunk_app_db_connect/db_connect/dbxproxy/identities/myidentity -d "{\"name\":\"myidentity\",\"username\":\"myuser\",\"myparam\":\"new_value\"}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, "myidentity" being the name of the identity.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 12:27:04 GMT</pubDate>
    <dc:creator>bazman</dc:creator>
    <dc:date>2023-04-21T12:27:04Z</dc:date>
    <item>
      <title>DBConnect: How to Edit DB Connections via REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/DBConnect-How-to-Edit-DB-Connections-via-REST-API/m-p/586517#M76172</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am using the REST API knowledge in -&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-V3-Automated-Programmatic-creation-of/m-p/304409" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-V3-Automated-Programmatic-cre...&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I am not able to update a DB connection. Is there a way to update it without having to delete it? My end goal is to update an identity, but for that, I am thinking if updating the db connection to point to another identity, then deleting the original identity, then creating a new one, and pointing my db connection to it via REST API.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 22:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/DBConnect-How-to-Edit-DB-Connections-via-REST-API/m-p/586517#M76172</guid>
      <dc:creator>vbatra</dc:creator>
      <dc:date>2022-03-10T22:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect: How to Edit DB Connections via REST API?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/DBConnect-How-to-Edit-DB-Connections-via-REST-API/m-p/640968#M78964</link>
      <description>&lt;P&gt;The solution that I found for this is to use the PUT method instead of a POST and to go to the endpoint specific to the connection.&lt;/P&gt;&lt;P&gt;For example to change "myparam":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -X PUT -u "admin":"changeit" --url https://localhost:8089/servicesNS/nobody/splunk_app_db_connect/db_connect/dbxproxy/connections/myconnection -d "{\"name\":\"myconnection\",\"identity\":\"myid\",\"connection_type\":\"mytype\",\"myparam\":\"new_value\"}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"myconnection" being the name of the connection you want to modify.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to put the name, identity and connection_type parameters otherwise it will throw an error. Also you cannot modify them.&lt;/P&gt;&lt;P&gt;It also works for &lt;STRONG&gt;editing Identities&lt;/STRONG&gt; and this time you have to put the name and username parameters :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -X PUT -u "admin":"changeit" --url https://localhost:8089/servicesNS/nobody/splunk_app_db_connect/db_connect/dbxproxy/identities/myidentity -d "{\"name\":\"myidentity\",\"username\":\"myuser\",\"myparam\":\"new_value\"}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, "myidentity" being the name of the identity.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:27:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/DBConnect-How-to-Edit-DB-Connections-via-REST-API/m-p/640968#M78964</guid>
      <dc:creator>bazman</dc:creator>
      <dc:date>2023-04-21T12:27:04Z</dc:date>
    </item>
  </channel>
</rss>

