<?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: Cisco ISE API to create a Custom Condition in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/cisco-ise-api-to-create-a-custom-condition/m-p/5234404#M593662</link>
    <description>&lt;P&gt;When trying new APIs for the first time - especially with complicated ones like ISE Policy - it is always helpful to create your desired configuration in the GUI then perform a GET request on the respective API to see the structure and values. You may then use that as a template for your POST or PUT methods for similar configurations.&lt;/P&gt;
&lt;P&gt;If the JSON above is for the POST, you do not include the &lt;FONT face="courier new,courier"&gt;link&lt;/FONT&gt; attribute in your POST request.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2024 14:45:46 GMT</pubDate>
    <dc:creator>thomas</dc:creator>
    <dc:date>2024-12-09T14:45:46Z</dc:date>
    <item>
      <title>Cisco ISE API to create a Custom Condition</title>
      <link>https://community.cisco.com/t5/network-access-control/cisco-ise-api-to-create-a-custom-condition/m-p/5229928#M593407</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;
&lt;P&gt;I'm using a Custom Condition to block some laptops names during authorization and it works fine.&lt;BR /&gt;I've managed to create an API to check the condition exist, and /add/remove new hosts to it, but I cannot manage to implement the call to create the Custom Condition if it does not exist (sb remove it). Using the Postman collection method here (&lt;A href="https://www.postman.com/lunar-module-astronomer-52086722/cisco-ise/request/527hljw/network-access-creates-a-library-condition)" target="_blank" rel="noopener"&gt;https://www.postman.com/lunar-module-astronomer-52086722/cisco-ise/request/527hljw/network-access-creates-a-library-condition)&lt;/A&gt;&amp;nbsp;I always got Error 400 "&lt;SPAN&gt;request has bad input format in the body&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;This is the JSON body I'm using for the API call:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"conditionType"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"LibraryConditionOrBlock"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"Deny_Machine_Names_TEST"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;The before payload is the reduced version of the JSON output of the existing object:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;{&lt;BR /&gt;"link": {&lt;BR /&gt;"rel": "self",&lt;BR /&gt;"href": "https://&amp;lt;ISE_URL&amp;gt;/api/v1/policy/network-access/condition/&amp;lt;OBJECT_ID&amp;gt;",&lt;BR /&gt;"type": "application/json"&lt;BR /&gt;},&lt;BR /&gt;"conditionType": "LibraryConditionOrBlock",&lt;BR /&gt;"isNegate": false,&lt;BR /&gt;"children": [&lt;BR /&gt;{&lt;BR /&gt;"link": None,&lt;BR /&gt;"conditionType": "ConditionAttributes",&lt;BR /&gt;"isNegate": False,&lt;BR /&gt;"dictionaryName": "Radius",&lt;BR /&gt;"attributeName": "User-Name",&lt;BR /&gt;"operator": "contains",&lt;BR /&gt;"dictionaryValue": None,&lt;BR /&gt;"attributeValue": "TT059"&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"name": "Deny_Machine_Names",&lt;BR /&gt;"description": None&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;DIV&gt;&lt;SPAN&gt;It doesn't matter if I use these basic fileds on the payload, or add more, it always returns error.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Jesus&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Nov 2024 07:16:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/cisco-ise-api-to-create-a-custom-condition/m-p/5229928#M593407</guid>
      <dc:creator>JPavonM</dc:creator>
      <dc:date>2024-11-28T07:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco ISE API to create a Custom Condition</title>
      <link>https://community.cisco.com/t5/network-access-control/cisco-ise-api-to-create-a-custom-condition/m-p/5234404#M593662</link>
      <description>&lt;P&gt;When trying new APIs for the first time - especially with complicated ones like ISE Policy - it is always helpful to create your desired configuration in the GUI then perform a GET request on the respective API to see the structure and values. You may then use that as a template for your POST or PUT methods for similar configurations.&lt;/P&gt;
&lt;P&gt;If the JSON above is for the POST, you do not include the &lt;FONT face="courier new,courier"&gt;link&lt;/FONT&gt; attribute in your POST request.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 14:45:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/cisco-ise-api-to-create-a-custom-condition/m-p/5234404#M593662</guid>
      <dc:creator>thomas</dc:creator>
      <dc:date>2024-12-09T14:45:46Z</dc:date>
    </item>
  </channel>
</rss>

