<?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: Accessing Cisco Prime API in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4579730#M825</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/178043"&gt;@luke.brooker1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The cURL example uses the -k flag (probably -K, see&amp;nbsp;&lt;A href="https://gist.github.com/eneko/dc2d8edd9a4b25c5b0725dd123f98b10" target="_blank" rel="noopener"&gt;list-of-curl-options.txt&lt;/A&gt;) but it appears you left this out in your call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 13:59:57 GMT</pubDate>
    <dc:creator>Alexander Stevenson</dc:creator>
    <dc:date>2022-03-28T13:59:57Z</dc:date>
    <item>
      <title>Accessing Cisco Prime API</title>
      <link>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4566978#M824</link>
      <description>&lt;P&gt;Hi All - sorry i'm not too experienced with API's and development, hopefully this question is OK;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I am interested in using the API in Cisco Prime Infrastructure (3.7.0). Following the built in tutorial on Prime (&lt;A href="https://Server/webacs/api/v4/?id=tutorials" target="_blank"&gt;https://Server/webacs/api/v4/?id=tutorials&lt;/A&gt;&amp;nbsp;) I get to this step;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;EM&gt;For this tutorial, the host name of my server is "my_server". So without further ado, here's our first cURL query.&lt;/EM&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;EM&gt;curl -k "&lt;A href="https://user:password@my_server/webacs/api/v4/data/Devices" target="_blank"&gt;https://user:password@my_server/webacs/api/v4/data/Devices&lt;/A&gt;&amp;nbsp;"&lt;/EM&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;When i try that, this is the output i get (i added the Prime Cert to my PC Trusted Certs, i'm using windows w/ PowerShell);&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PS C:\Users\&amp;gt; curl "&lt;A href="https://MyUser:MyPass@serverip/webacs/api/v4/data/Devices" target="_blank" rel="noopener nofollow ugc"&gt;https://MyUser:MyPass@ServerIP/webacs/api/v4/data/Devices&lt;/A&gt;"&lt;BR /&gt;&lt;BR /&gt;StatusCode : 200&lt;BR /&gt;&lt;BR /&gt;StatusDescription :&lt;BR /&gt;&lt;BR /&gt;Content : &amp;lt;!--Guidelines for i18n&lt;BR /&gt;&lt;BR /&gt;Use bean:message tag for internationalization of strings.&lt;BR /&gt;&lt;BR /&gt;Use dojo/i18n module to internationalize strings delivered through Dojo framework.&lt;BR /&gt;&lt;BR /&gt;i18n design document ED...&lt;BR /&gt;&lt;BR /&gt;RawContent : HTTP/1.1 200&lt;BR /&gt;&lt;BR /&gt;X-XSS-Protection: 1; mode=block&lt;BR /&gt;&lt;BR /&gt;X-Content-Type-Options: nosniff,nosniff&lt;BR /&gt;&lt;BR /&gt;Content-Security-Policy: default-src https: data: 'unsafe-inline' 'unsafe-eval'&lt;BR /&gt;&lt;BR /&gt;X-FRAME-OPTIONS: SAMEORIGIN&lt;BR /&gt;&lt;BR /&gt;T...&lt;BR /&gt;&lt;BR /&gt;Forms : {loginForm}&lt;BR /&gt;&lt;BR /&gt;Headers : {[X-XSS-Protection, 1; mode=block], [X-Content-Type-Options, nosniff,nosniff],&lt;BR /&gt;&lt;BR /&gt;[Content-Security-Policy, default-src https: data: 'unsafe-inline' 'unsafe-eval'],&lt;BR /&gt;&lt;BR /&gt;[X-FRAME-OPTIONS, SAMEORIGIN]...}&lt;BR /&gt;&lt;BR /&gt;Images : {}&lt;BR /&gt;&lt;BR /&gt;InputFields : {@{innerHTML=; innerText=; outerHTML=&amp;lt;input name="j\_username" type="hidden"&amp;gt;; outerText=;&lt;BR /&gt;&lt;BR /&gt;tagName=INPUT; name=j_username; type=hidden}, @{innerHTML=; innerText=; outerHTML=&amp;lt;input&lt;BR /&gt;&lt;BR /&gt;name="j_password" type="hidden"&amp;gt;; outerText=; tagName=INPUT; name=j_password; type=hidden},&lt;BR /&gt;&lt;BR /&gt;@{innerHTML=; innerText=; outerHTML=&amp;lt;input name="spring-security-redirect"&lt;BR /&gt;&lt;BR /&gt;id="spring-security-redirect" type="hidden" value="/pages/common/index.jsp"&amp;gt;; outerText=;&lt;BR /&gt;&lt;BR /&gt;tagName=INPUT; name=spring-security-redirect; id=spring-security-redirect; type=hidden;&lt;BR /&gt;&lt;BR /&gt;value=/pages/common/index.jsp}, @{innerHTML=; innerText=; outerHTML=&amp;lt;input name="action"&lt;BR /&gt;&lt;BR /&gt;type="hidden" value="login"&amp;gt;; outerText=; tagName=INPUT; name=action; type=hidden; value=login}}&lt;BR /&gt;&lt;BR /&gt;Links : {}&lt;BR /&gt;&lt;BR /&gt;ParsedHtml : mshtml.HTMLDocumentClass&lt;BR /&gt;&lt;BR /&gt;RawContentLength : 11693&lt;/PRE&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I believe I should get a list of Devices managed in Prime. I'm not sure why this is happening. The account I'm using for the API call has these permissions ticked;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;NBI Credential&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;NBI Read&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;NBI Write&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Any idea's or tips on what to try next?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 11:10:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4566978#M824</guid>
      <dc:creator>luke.brooker1</dc:creator>
      <dc:date>2022-03-09T11:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Cisco Prime API</title>
      <link>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4579730#M825</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/178043"&gt;@luke.brooker1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The cURL example uses the -k flag (probably -K, see&amp;nbsp;&lt;A href="https://gist.github.com/eneko/dc2d8edd9a4b25c5b0725dd123f98b10" target="_blank" rel="noopener"&gt;list-of-curl-options.txt&lt;/A&gt;) but it appears you left this out in your call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 13:59:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4579730#M825</guid>
      <dc:creator>Alexander Stevenson</dc:creator>
      <dc:date>2022-03-28T13:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Cisco Prime API</title>
      <link>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4580146#M826</link>
      <description>&lt;P&gt;I got this all working, i ended up using 'Postman API platform' which created the Auth details for me, and could export for use in PowerShell.. This was what i required;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Basic &amp;lt;&amp;lt;Snip&amp;gt;&amp;gt;")
$headers.Add("Cookie", "JSESSIONID=&amp;lt;&amp;lt;Snip&amp;gt;&amp;gt;")&lt;/PRE&gt;&lt;P&gt;and then any API call just needed to be appended with;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;-Method 'GET' -Headers $headers&lt;/PRE&gt;&lt;P&gt;Once i worked this bit out, everything worked fine&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 01:33:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/accessing-cisco-prime-api/m-p/4580146#M826</guid>
      <dc:creator>luke.brooker1</dc:creator>
      <dc:date>2022-03-29T01:33:44Z</dc:date>
    </item>
  </channel>
</rss>

