cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
662
Views
0
Helpful
0
Replies

Unable to get Flow data from NDI

Petar Rusev
Level 1
Level 1

Hello all,

I am trying from some time to export Flow Telemetry data from our NDI installation. Running the NDI and accessing the information through the GUI is working fine, but the APIs seems to not working.

What is the background? I would like to export the Flow data, so I can do further analysis with the data, like migration planning and etc.

Version that we use is: ND: 2.2(2d) with NDI 6.1.3.94

The issue that I have is when I try to get Flow data I get nothing. 

Example 1: Top Flows:

import requests
import json
url = "https://{{host}}/sedgeapi/v1/cisco-nir/api/api/telemetry/flows/topFlows.json"
payload = ""
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'AuthCookie=<Token>'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
 
The only output that I get is an empty: 
{
    "nodeName": null,
    "description": "",
    "statName": null,
    "entries": [],
    "totalResultsCount": 0,
    "totalItemsCount": 0,
    "offset": 0
}
 
Example 2: Flow Details:
import requests
import json

url = "https://{{host}}/sedgeapi/v1/cisco-nir/api/api/telemetry/flows/details.json"
payload = json.dumps({
  "siteGroupName": "BB-ACI",
  "startDate": "2023-04-03T12:00:21-01:00",
  "endDate": "2023-04-03T13:00:21-01:00"
})
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'AuthCookie=<Token>'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
 
The only response which I get here is: 
Missing mandatory parameters in the query. Please check API documentation.
 
I have checked the documentation, but there is no reference for a way to send the mandatory parameters towards the NDI. I think I am doing it correctly, but I cannot succeed. 
The above examples are from Postman, but I get the same results when I use the code and push it directly via Python. 
Any idea how can I get a meaningful result?
0 Replies 0