08-24-2024 07:23 PM
I'm using the SNA APIs with dCloud. When I use the following API "/tenants/{tenantId}/devices" in Postman, I get the error message, "The requested resource could not be found." It should return
I'm not able to use any of the APIs within this branch regarding devices, interfaces, traffic, alarms, exporters, etc. because they require a device-id.
Can someone explain why I'm not getting any resources returned for devices? How do I determine what those devices are and look for them within the SNA GUI? Thanks.
07-11-2025 09:00 AM
You're running into a common issue when using Cisco Secure Network Analytics (SNA) APIs — especially in dCloud environments, which often have preconfigured tenants but minimal or no data populated.
The key error:
"The requested resource could not be found"
…when calling:
GET /tenants/{tenantId}/devices
— indicates that either:
The tenant ID is invalid, or
The tenant exists but has no registered devices, or
You’re using an incorrect base URL or token scope
Let’s walk through a clear troubleshooting path to help you get valid device data from the API.
Step-by-Step Troubleshooting
1. Verify Tenant ID Is Correct and Exists
First, confirm you're using a valid tenant ID.
Use this API to list available tenants:
http
Copy
Edit
GET /tenants
This returns an array of tenants like:
json
Copy
Edit
[
{
"id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab",
"name": "DefaultTenant"
}
]
Make sure the tenantId you're using is the correct one from this list.
2. Verify Devices Exist for That Tenant
If the /devices endpoint under a valid tenant returns nothing or 404, it means:
The tenant has no visible or registered exporters, flow sources, or monitored entities
This is very common in dCloud labs if no data or traffic is actively flowing
Try this:
h
Copy
Edit
GET /tenants/{tenantId}/devices
If it still fails:
Make sure you are using a valid Bearer token
Use Accept: application/json headers in Postman
3. Check the SNA GUI for Devices
In the SNA Web UI (Stealthwatch GUI):
Log in to the WebUI of the SNA Manager (SMC)
Go to:
Hosts > Host Groups – See if any host IPs are classified
Analysis > Flows – See if any data is visible
Integration > Flow Sources or System > Data Sources – to view exporters/devices
Search for NetFlow exporters / flow sensors – these are the "devices" exposed by the API
If no exporters are configured or no traffic is flowing, the API will not return any devices.
4. Alternative: Use /flows or /hostgroups
If devices aren't working due to empty cluster or lab setup, try endpoints that don’t depend on exporter device IDs:
GET /tenants/{tenantId}/hostgroups
GET /tenants/{tenantId}/flows
GET /tenants/{tenantId}/alarms
Note: These will still return empty arrays if there’s no live data in the lab.
Extra: Sample API Path Setup
If you're using dCloud, make sure your API environment is set up like this:
Base URL:
https://<dcloud-sna-host>/sw-reporting/v2
Example working call:
http
Copy
Edit
GET /sw-reporting/v2/tenants
Authorization: Bearer <token>
Accept: application/json
Then use:
http
Copy
Edit
GET /sw-reporting/v2/tenants/{tenantId}/devices
Summary
Cause Fix
Wrong or empty tenant ID Use GET /tenants to confirm valid ID
No devices registered in dCloud lab Check GUI under Data Sources / Flow Exporters
No data flowing = no devices populated Trigger simulated flows or check lab setup
Incorrect API base URL or auth token Ensure /sw-reporting/v2/ base path is correct
Next Step
Check the output of:
http
Copy
Edit
GET /tenants
And send back the result or tenantId you're using — I can help verify if it's valid and what next endpoints to try based on that.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide