<?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: API call to get Link Data in VeloCloud Discussions</title>
    <link>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980627#M118</link>
    <description>&lt;P&gt;After some searching around, I've found this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;print(data['link'])&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 03 Aug 2023 15:45:38 GMT</pubDate>
    <dc:creator>Gizzie</dc:creator>
    <dc:date>2023-08-03T15:45:38Z</dc:date>
    <item>
      <title>API call to get Link Data</title>
      <link>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980624#M117</link>
      <description>&lt;P&gt;Using the API Request I am trying to retrieve Link information.&amp;nbsp; WHen I make the API Request&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;https://{api_host}//api/sdwan/v2/enterprises/&lt;/SPAN&gt;&lt;SPAN class=""&gt;{enterpriseLogicalId}&lt;/SPAN&gt;&lt;SPAN&gt;/edges/&lt;/SPAN&gt;&lt;SPAN class=""&gt;{edgeLogicalId}&lt;/SPAN&gt;&lt;SPAN&gt;/linkStats&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I am only getting&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt; &lt;SPAN class=""&gt;"autoDualMode"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"string"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bestJitterMsRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bestJitterMsTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bestLatencyMsRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bestLatencyMsTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bestLossPctRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bestLossPctTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bpsOfBestPathRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bpsOfBestPathTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bytesRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"bytesTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"controlBytesRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"controlBytesTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"controlPacketsRx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"controlPacketsTx"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;"link"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt; &lt;SPAN class=""&gt;"_href"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"string"&lt;FONT color="#999999"&gt;}, "name": "string"&lt;BR /&gt;&lt;BR /&gt;How can I make it get all the details in the link nested dict like shown here&amp;nbsp;&lt;BR /&gt;&lt;A href="https://developer.vmware.com/apis/vmware-sase-platform/vmware-sdwan/latest/api/sdwan/v2/enterprises/enterpriseLogicalId/edges/edgeLogicalId/linkStats/get/" target="_blank" rel="noopener"&gt;https://developer.vmware.com/apis/vmware-sase-platform/vmware-sdwan/latest/api/sdwan/v2/enterprises/enterpriseLogicalId/edges/edgeLogicalId/linkStats/get/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Code for reference&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;def get_edge_link_metrics():&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;endpoint = f'https://{api_host}//api/sdwan/v2/enterprises/{enterpriseLogicalId}/edges/{edgeLogicalId}/linkStats'&lt;/P&gt;&lt;P&gt;head = {'Authorization': f'token {myToken}'}&lt;/P&gt;&lt;P&gt;response = requests.get(endpoint, headers=head,)&lt;BR /&gt;if response.status_code == 200:&lt;BR /&gt;# Successful response, you can process the data here&lt;BR /&gt;data = response.json()&lt;BR /&gt;print(data)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;else:&lt;BR /&gt;# Handle errors&lt;BR /&gt;print(f"Error: {response.status_code} - {response.text}")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;get_edge_link_metrics()&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;FONT color="#999999"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 15:31:44 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980624#M117</guid>
      <dc:creator>icbryant9</dc:creator>
      <dc:date>2023-08-03T15:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: API call to get Link Data</title>
      <link>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980627#M118</link>
      <description>&lt;P&gt;After some searching around, I've found this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;print(data['link'])&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Aug 2023 15:45:38 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980627#M118</guid>
      <dc:creator>Gizzie</dc:creator>
      <dc:date>2023-08-03T15:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: API call to get Link Data</title>
      <link>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980631#M119</link>
      <description>&lt;P&gt;Yeah this is what I have been trying.&amp;nbsp; But it will only return the&amp;nbsp;_href': value.&amp;nbsp; The rest of the dict is empty.&amp;nbsp; I tried this on multiple velcloud devices with multiple links and none of it works.&amp;nbsp;&amp;nbsp;print(data[0]["link"]) Mention&amp;nbsp;data[0] for Link 1.&amp;nbsp; output below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;====== RESTART: C:\Users\ib311515\Desktop\Sitestatus\Velocloud_api_pt3.py ======&lt;BR /&gt;{'_href': '/api/sdwan/v2/enterprises&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="icbryant9_1-1691078385706.png" style="width: 400px;"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/102869iE62A27F76B6FAD03/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="icbryant9_1-1691078385706.png" alt="icbryant9_1-1691078385706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 16:02:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980631#M119</guid>
      <dc:creator>icbryant9</dc:creator>
      <dc:date>2023-08-03T16:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: API call to get Link Data</title>
      <link>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980769#M123</link>
      <description>&lt;P&gt;How about using Postman?&lt;BR /&gt;It helps to verify the response.&lt;BR /&gt;&lt;BR /&gt;I got link data using Postman.&lt;BR /&gt;My test steps are below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;1. Get Enterprise Logical ID&lt;BR /&gt;I got my enterpse logicalId via API v1.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Request: Post&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;"https://&amp;lt;vco-fqdn&amp;gt;/portal/rest/enterprise/getEnterprise"&lt;/P&gt;&lt;P&gt;I got &lt;SPAN class=""&gt;enterpriseLogicalId&lt;/SPAN&gt; like this.&lt;BR /&gt;xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2. Get Edge Logical ID&lt;BR /&gt;I got my edge logicalId via API v1.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Request: Post&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;https://&amp;lt;vco-fqdn&amp;gt;/portal/rest/enterprise/getEnterpriseEdges&lt;/P&gt;&lt;P&gt;I got &lt;SPAN class=""&gt;edgeLogicalId&amp;nbsp;&lt;/SPAN&gt;like this.&lt;BR /&gt;yyyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyy&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3. Get Link stats&lt;BR /&gt;&lt;SPAN&gt;Request: Get&lt;BR /&gt;https://{vco-fqdn}//api/sdwan/v2/enterprises/&lt;/SPAN&gt;&lt;SPAN class=""&gt;{enterpriseLogicalId}&lt;/SPAN&gt;&lt;SPAN&gt;/edges/&lt;/SPAN&gt;&lt;SPAN class=""&gt;{edgeLogicalId}&lt;/SPAN&gt;&lt;SPAN&gt;/linkStats&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 09:19:25 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980769#M123</guid>
      <dc:creator>khirom</dc:creator>
      <dc:date>2023-08-04T09:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: API call to get Link Data</title>
      <link>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980889#M124</link>
      <description>&lt;P&gt;Yeah I tried Postman as well, same issue.&amp;nbsp; I think there is an issue with the API request itself.&amp;nbsp; Weird that it would only return one item in the Nested Dictionaries&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="icbryant9_0-1691184953904.png" style="width: 400px;"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/102900iB0BB8CDD10168A29/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="icbryant9_0-1691184953904.png" alt="icbryant9_0-1691184953904.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2023 21:37:36 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VeloCloud-Discussions/API-call-to-get-Link-Data/m-p/2980889#M124</guid>
      <dc:creator>icbryant9</dc:creator>
      <dc:date>2023-08-04T21:37:36Z</dc:date>
    </item>
  </channel>
</rss>

