<?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: FMC API Move rule to another category/section in DevNet Sandbox</title>
    <link>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5035905#M9623</link>
    <description>&lt;P&gt;As far as I can tell,&amp;nbsp;&lt;SPAN&gt;moving an existing access control rule to a different category through the Cisco FMC API is not directly supported via a simple API call. The API doesn't provide a straightforward method to change the category of a rule without deleting and recreating it. This would explain the error messages you're receiving: the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;category&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;field may not be recognized or modifiable through the API for an existing rule.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You will get better results if you search/ask about FMC in the Network Security forum:&amp;nbsp;&lt;A href="https://community.cisco.com/t5/network-security/bd-p/disc-network-security" target="_blank"&gt;https://community.cisco.com/t5/network-security/bd-p/disc-network-security&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Check out the Docs:&amp;nbsp;&lt;A href="https://www.cisco.com/c/en/us/td/docs/security/firepower/70/api/REST/firepower_management_center_rest_api_quick_start_guide_70/About_The_Firepower_Management_Center_REST_API.html" target="_blank"&gt;https://www.cisco.com/c/en/us/td/docs/security/firepower/70/api/REST/firepower_management_center_rest_api_quick_start_guide_70/About_The_Firepower_Management_Center_REST_API.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Reach out to Cisco Support: Since this seems to be a limitation of the API, contacting Cisco TAC (Technical Assistance Center) might provide you with the latest information or workarounds specific to your FMC version:&amp;nbsp;&lt;A href="https://www.cisco.com/c/en/us/support/index.html" target="_blank"&gt;https://www.cisco.com/c/en/us/support/index.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 13:48:45 GMT</pubDate>
    <dc:creator>Alexander Stevenson</dc:creator>
    <dc:date>2024-03-07T13:48:45Z</dc:date>
    <item>
      <title>FMC API Move rule to another category/section</title>
      <link>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5035773#M9620</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to move a rule to a category/section via the API, but I'm not sure how to do it via the PUT endpoint. I have tried this:&lt;/P&gt;&lt;P&gt;PUT with partialUpdate=True with following payload:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;{"metadata": {"category":"test_category"}, "id":rule_id}&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Response:&lt;/DIV&gt;&lt;DIV&gt;code 422, text:&amp;nbsp;Unprocessable Entity - Unrecognized Field 'category' in request payload&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;PUT with partialUpdate=True with following payload:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;json_body={"category":"test_category", "id":rule_id}&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Response:&lt;/DIV&gt;&lt;DIV&gt;code 200, OK&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But the category is not changed. The rule remains in its original position on the FMC.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have also tried specifying category and automation in the PUT endpoint like so:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;EM&gt;api/fmc_config/v1/domain/{domain}/policy/accesspolicies/{policy}/accessrules/{rule_id}?bulk=false&amp;amp;partialUpdate=true&amp;amp;&lt;STRONG&gt;category=test_category&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but I get status code 400 with the following error:&amp;nbsp;&lt;STRONG&gt;Invalid query parameter for the PUT operation.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The only option I could think of is to delete the rule and recreate it with the POST endpoint which allows me to specify category/section, but that would mean the comment history list would be lost.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We are using FMC&amp;nbsp;&lt;SPAN&gt;7.2.4-169&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:32:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5035773#M9620</guid>
      <dc:creator>VladAndrei</dc:creator>
      <dc:date>2024-03-07T10:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: FMC API Move rule to another category/section</title>
      <link>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5035905#M9623</link>
      <description>&lt;P&gt;As far as I can tell,&amp;nbsp;&lt;SPAN&gt;moving an existing access control rule to a different category through the Cisco FMC API is not directly supported via a simple API call. The API doesn't provide a straightforward method to change the category of a rule without deleting and recreating it. This would explain the error messages you're receiving: the&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;category&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;field may not be recognized or modifiable through the API for an existing rule.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You will get better results if you search/ask about FMC in the Network Security forum:&amp;nbsp;&lt;A href="https://community.cisco.com/t5/network-security/bd-p/disc-network-security" target="_blank"&gt;https://community.cisco.com/t5/network-security/bd-p/disc-network-security&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Check out the Docs:&amp;nbsp;&lt;A href="https://www.cisco.com/c/en/us/td/docs/security/firepower/70/api/REST/firepower_management_center_rest_api_quick_start_guide_70/About_The_Firepower_Management_Center_REST_API.html" target="_blank"&gt;https://www.cisco.com/c/en/us/td/docs/security/firepower/70/api/REST/firepower_management_center_rest_api_quick_start_guide_70/About_The_Firepower_Management_Center_REST_API.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Reach out to Cisco Support: Since this seems to be a limitation of the API, contacting Cisco TAC (Technical Assistance Center) might provide you with the latest information or workarounds specific to your FMC version:&amp;nbsp;&lt;A href="https://www.cisco.com/c/en/us/support/index.html" target="_blank"&gt;https://www.cisco.com/c/en/us/support/index.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 13:48:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5035905#M9623</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2024-03-07T13:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: FMC API Move rule to another category/section</title>
      <link>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5104858#M9968</link>
      <description>&lt;P&gt;Same issue, it does not seems to be possible to change the metadata. Changing the name and other parameters work fine, but nothing in the metadata.&lt;/P&gt;&lt;P&gt;I was hoping my script could change the category of all rules to have some kind of structure, but we will need to use the bulk edit in the GUI.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 09:58:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/devnet-sandbox/fmc-api-move-rule-to-another-category-section/m-p/5104858#M9968</guid>
      <dc:creator>KRVE</dc:creator>
      <dc:date>2024-05-15T09:58:45Z</dc:date>
    </item>
  </channel>
</rss>

