<?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 Unable to find exact api url for device certificate features like import, export, renew and revoke in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/416473#M2713</link>
    <description>&lt;P&gt;Can someone help to&amp;nbsp;find exact api url for device certificate features like import, export, renew, revoke, generate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to generate certificate under template(tlv-5260) but it is getting generated under panorama tab only instead of Device Tab as per API URL given under Manage Certificates(API) page link.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/10-0/pan-os-panorama-api/pan-os-xml-api-use-cases/manage-certificates-api.html" target="_blank" rel="noopener"&gt;https://docs.paloaltonetworks.com/pan-os/10-0/pan-os-panorama-api/pan-os-xml-api-use-cases/manage-certificates-api.html&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;API URL that I was trying to use as below:&lt;BR /&gt;&lt;SPAN&gt;"https://&amp;lt;panorama-ip&amp;gt;/api/?type=op&amp;amp;cmd=&amp;lt;request&amp;gt;&amp;lt;certificate&amp;gt;&amp;lt;generate&amp;gt;&amp;lt;algorithm&amp;gt;&amp;lt;RSA&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;rsa-nbits&amp;gt;512&amp;lt;/rsa-nbits&amp;gt;&amp;lt;/RSA&amp;gt;&amp;lt;/algorithm&amp;gt;&amp;lt;certificate-name&amp;gt;SSCert&amp;lt;/certificate-name&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;name&amp;gt;10.1.1.1&amp;lt;/name&amp;gt;&amp;lt;ca&amp;gt;yes&amp;lt;/ca&amp;gt;&amp;lt;/generate&amp;gt;&amp;lt;/certificate&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;target-tpl=template&amp;amp;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"target-tpl-vsys=vsys1&amp;amp;template=tlv-5260&amp;amp;key=&amp;lt;api-key&amp;gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also I tried to generate the certificate with below XML API as well but I am not sure which action I should use for remaining features like import/export/renew/revoke.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"https://&amp;lt;panorama-ip&amp;gt;/api/?type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name=\'localhost.localdomain\']"&lt;BR /&gt;"/template/entry[@name='{}']/config/shared/certificate/entry[@name='&amp;lt;certificate-name&amp;gt;']&amp;amp;element=&amp;lt;common-name&amp;gt;10.0.0.1&amp;lt;/common-name&amp;gt;&amp;amp;key=&amp;lt;api-key&amp;gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It would be better if someone can test the same and share the exact URL for all the features.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 11:56:04 GMT</pubDate>
    <dc:creator>AModi</dc:creator>
    <dc:date>2021-07-01T11:56:04Z</dc:date>
    <item>
      <title>Unable to find exact api url for device certificate features like import, export, renew and revoke</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/416473#M2713</link>
      <description>&lt;P&gt;Can someone help to&amp;nbsp;find exact api url for device certificate features like import, export, renew, revoke, generate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to generate certificate under template(tlv-5260) but it is getting generated under panorama tab only instead of Device Tab as per API URL given under Manage Certificates(API) page link.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/pan-os/10-0/pan-os-panorama-api/pan-os-xml-api-use-cases/manage-certificates-api.html" target="_blank" rel="noopener"&gt;https://docs.paloaltonetworks.com/pan-os/10-0/pan-os-panorama-api/pan-os-xml-api-use-cases/manage-certificates-api.html&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;API URL that I was trying to use as below:&lt;BR /&gt;&lt;SPAN&gt;"https://&amp;lt;panorama-ip&amp;gt;/api/?type=op&amp;amp;cmd=&amp;lt;request&amp;gt;&amp;lt;certificate&amp;gt;&amp;lt;generate&amp;gt;&amp;lt;algorithm&amp;gt;&amp;lt;RSA&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;rsa-nbits&amp;gt;512&amp;lt;/rsa-nbits&amp;gt;&amp;lt;/RSA&amp;gt;&amp;lt;/algorithm&amp;gt;&amp;lt;certificate-name&amp;gt;SSCert&amp;lt;/certificate-name&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;name&amp;gt;10.1.1.1&amp;lt;/name&amp;gt;&amp;lt;ca&amp;gt;yes&amp;lt;/ca&amp;gt;&amp;lt;/generate&amp;gt;&amp;lt;/certificate&amp;gt;&amp;lt;/request&amp;gt;&amp;amp;target-tpl=template&amp;amp;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"target-tpl-vsys=vsys1&amp;amp;template=tlv-5260&amp;amp;key=&amp;lt;api-key&amp;gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also I tried to generate the certificate with below XML API as well but I am not sure which action I should use for remaining features like import/export/renew/revoke.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"https://&amp;lt;panorama-ip&amp;gt;/api/?type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name=\'localhost.localdomain\']"&lt;BR /&gt;"/template/entry[@name='{}']/config/shared/certificate/entry[@name='&amp;lt;certificate-name&amp;gt;']&amp;amp;element=&amp;lt;common-name&amp;gt;10.0.0.1&amp;lt;/common-name&amp;gt;&amp;amp;key=&amp;lt;api-key&amp;gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It would be better if someone can test the same and share the exact URL for all the features.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 11:56:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/416473#M2713</guid>
      <dc:creator>AModi</dc:creator>
      <dc:date>2021-07-01T11:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find exact api url for device certificate features like import, export, renew and revoke</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/416518#M2714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/178755"&gt;@AModi&lt;/a&gt;, one good way to get the correct API call is to debug the CLI, details &lt;A href="https://docs.paloaltonetworks.com/pan-os/10-1/pan-os-panorama-api/get-started-with-the-pan-os-xml-api/explore-the-api/use-the-cli-to-find-xml-api-syntax.html" target="_self"&gt;here&lt;/A&gt;. If you are unsure of CLI commands, on the CLI you can type "&lt;FONT face="courier new,courier"&gt;find command keyword {{something}}&lt;/FONT&gt;" to find the correct command.&lt;BR /&gt;&lt;BR /&gt;In this instance, whilst the web GUI uses "&lt;FONT face="courier new,courier"&gt;target-tpl=template&lt;/FONT&gt;" to direct commands to a specific template in Panorama, this cannot be used as an external XML API client. Instead, first "set" the target template with this command, as you would on CLI:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://{{host}}/api?key={{key}}&amp;amp;type=op&amp;amp;cmd=&amp;lt;set&amp;gt;&amp;lt;system&amp;gt;&amp;lt;setting&amp;gt;&amp;lt;target&amp;gt;&amp;lt;template&amp;gt;&amp;lt;name&amp;gt;{{template-name}}&amp;lt;/name&amp;gt;&amp;lt;/template&amp;gt;&amp;lt;/target&amp;gt;&amp;lt;/setting&amp;gt;&amp;lt;/system&amp;gt;&amp;lt;/set&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then carry on with your subsequent certificate operation API calls, but do not include the "&lt;FONT face="courier new,courier"&gt;target-tpl=template&lt;/FONT&gt;" part. For example, these two commands will lead you to upload a certificate to a specific template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://{{host}}/api?key={{key}}&amp;amp;type=op&amp;amp;cmd=&amp;lt;set&amp;gt;&amp;lt;system&amp;gt;&amp;lt;setting&amp;gt;&amp;lt;target&amp;gt;&amp;lt;template&amp;gt;&amp;lt;name&amp;gt;{{template-name}}&amp;lt;/name&amp;gt;&amp;lt;/template&amp;gt;&amp;lt;/target&amp;gt;&amp;lt;/setting&amp;gt;&amp;lt;/system&amp;gt;&amp;lt;/set&amp;gt;

https://{{host}}/api/?key={{key}}&amp;amp;type=import&amp;amp;category=certificate&amp;amp;format=pem&amp;amp;certificate-name={{cert-name}}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 14:24:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/416518#M2714</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2021-07-01T14:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find exact api url for device certificate features like import, export, renew and revoke</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/428701#M2768</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/4294"&gt;@JimmyHolland&lt;/a&gt;&amp;nbsp;for sharing the solution, I tried it &amp;amp; it worked for me.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 10:46:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/428701#M2768</guid>
      <dc:creator>AModi</dc:creator>
      <dc:date>2021-08-24T10:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find exact api url for device certificate features like import, export, renew and revoke</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/446833#M2829</link>
      <description>&lt;P&gt;This is really great info. So I got the first line without issue so I am set on the correct template however where I am confused is step 2. How do you select the certificate to upload? Like the actual file that is on my PC for example. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 22:07:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/446833#M2829</guid>
      <dc:creator>jasonwald</dc:creator>
      <dc:date>2021-11-10T22:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to find exact api url for device certificate features like import, export, renew and revoke</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/447238#M2831</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/128435"&gt;@jasonwald&lt;/a&gt;&amp;nbsp;, you can use requests module with parameter "files=&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN class=""&gt;"file"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN class=""&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;target file path&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;"rb"&lt;/SPAN&gt;&lt;SPAN&gt;)}" inside it for import feature for certificate.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 17:36:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/unable-to-find-exact-api-url-for-device-certificate-features/m-p/447238#M2831</guid>
      <dc:creator>AModi</dc:creator>
      <dc:date>2021-11-12T17:36:45Z</dc:date>
    </item>
  </channel>
</rss>

