<?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: Modify FMC Objects via API in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285317#M1078072</link>
    <description>&lt;P&gt;Finding the ID for every object seems....burdensome. If I need to batch update objects, is this the only way to do it without going one by one in the GUI?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 15:54:21 GMT</pubDate>
    <dc:creator>Scott_22</dc:creator>
    <dc:date>2021-02-03T15:54:21Z</dc:date>
    <item>
      <title>Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4284423#M1078004</link>
      <description>&lt;P&gt;I've been reviewing documentation for the FMC API and have not come across a script to update an existing object. Is there a way to perform this function as of FMC version 6.6.1? I have successfully created objects, but I require further information to update one.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 15:59:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4284423#M1078004</guid>
      <dc:creator>Scott_22</dc:creator>
      <dc:date>2021-02-02T15:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4284724#M1078021</link>
      <description>&lt;P&gt;you need to use PUT to update objects.&amp;nbsp; So you would need to find the ID of the object you intend to update or you could just find the URL located in "links": {"self": "https://......."}&lt;/P&gt;
&lt;P&gt;for example, the following is a group that I created in my lab.&amp;nbsp; I could get the "links"["self"] output and use that when sending a PUT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" microlight"&gt;    {
      "links": {
        "self": "https://1.1.1.1/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/object/hosts/000C29C8-1550-0ed3-0000-017179869705",
        "parent": "https://1.1.1.1/api/fmc_config/v1/domain/e276abec-e0f2-11e3-8169-6d9ed49b625f/object/networkaddresses"
      },
      "type": "Host",
      "value": "192.168.0.100",
      "overridable": false,
      "description": " ",
      "id": "000C29C8-1550-0ed3-0000-017179869705",
      "name": "object1",
      "metadata": {
        "timestamp": 1610444763286,
        "lastUser": {
          "name": "marius"
        },
        "domain": {
          "name": "Global",
          "id": "e276abec-e0f2-11e3-8169-6d9ed49b625f",
          "type": "Domain"
        },
        "ipType": "V_4",
        "parentType": "NetworkAddress"
      }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 21:42:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4284724#M1078021</guid>
      <dc:creator>Marius Gunnerud</dc:creator>
      <dc:date>2021-02-02T21:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285317#M1078072</link>
      <description>&lt;P&gt;Finding the ID for every object seems....burdensome. If I need to batch update objects, is this the only way to do it without going one by one in the GUI?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 15:54:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285317#M1078072</guid>
      <dc:creator>Scott_22</dc:creator>
      <dc:date>2021-02-03T15:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285536#M1078085</link>
      <description>&lt;P&gt;I was not thinking of doing it one by one in GUI. I was leaning more towards scripting using python or similar.&lt;/P&gt;
&lt;P&gt;You could try the api-explorer GET the objects you require, change the values and then send the updates with a PUT&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 19:31:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285536#M1078085</guid>
      <dc:creator>Marius Gunnerud</dc:creator>
      <dc:date>2021-02-03T19:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285592#M1078093</link>
      <description>&lt;P&gt;Can you provide documentation on the GET procedure to pull the objects and PUT?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 21:21:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285592#M1078093</guid>
      <dc:creator>Scott_22</dc:creator>
      <dc:date>2021-02-03T21:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285599#M1078094</link>
      <description>&lt;P&gt;The api-explorer can be found on your FMC.&amp;nbsp; just go to &lt;A href="https://&amp;lt;ip" target="_blank"&gt;https://&amp;lt;ip&lt;/A&gt;&amp;nbsp;of fmc&amp;gt;/api/api-explorer.&amp;nbsp; All available GET, PUT, POST and DELETE can be found here an you can try them out/use them individually.&lt;/P&gt;
&lt;P&gt;You can also go to DevNet for free courses on APIs:&amp;nbsp;&lt;A href="https://developer.cisco.com/startnow/" target="_blank"&gt;https://developer.cisco.com/startnow/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 21:34:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285599#M1078094</guid>
      <dc:creator>Marius Gunnerud</dc:creator>
      <dc:date>2021-02-03T21:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285610#M1078097</link>
      <description>&lt;P&gt;Using an existing library would probably be the best idea, that way you do not have to worry about paging, etc.&lt;/P&gt;&lt;P&gt;Example in Python using FireREST (&lt;A href="https://github.com/kaisero/fireREST" target="_blank" rel="noopener"&gt;https://github.com/kaisero/fireREST&lt;/A&gt;). See README for installation instructions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# import FMC object from FireREST library
from fireREST import FMC

# initialize API object (authenticated with FMC)
fmc = FMC(hostname='fmc.example.com', username='api', password='Cisco123', domain='Global')

# get all network obejcts from Global domain
networks = fmc.object.network.get()

# iterate through all network obejcts and change description
for network in networks:
    network['description'] = 'Changed smth via API'
    fmc.object.network.update(data=network)
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 21:54:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4285610#M1078097</guid>
      <dc:creator>Oliver Kaiser</dc:creator>
      <dc:date>2021-02-03T21:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Modify FMC Objects via API</title>
      <link>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4316361#M1079791</link>
      <description>&lt;P&gt;Once the objects are pulled using FireREST, is there a mechanism to go through and update the name of the objects, then push the updated list to the FMC? This way I don't have duplicates.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 18:44:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/modify-fmc-objects-via-api/m-p/4316361#M1079791</guid>
      <dc:creator>Scott_22</dc:creator>
      <dc:date>2021-03-30T18:44:13Z</dc:date>
    </item>
  </channel>
</rss>

