03-20-2020 12:24 PM
Hello,
Im having an issue in which I am able to authenticate on the API query to my production SMC and retrieve an authentication token, and then query for the tenant-id successfully. Every subsequent call fails, and I cant retrieve the host groups / tags with this API call:
https://{{STEALTHWATCH-SMC}}/smc-configuration/rest/v1/tenants/{{tenant-id}}/tags/
As it ends up in a 404.
Would anyone happen to know the issue here? Why would I be able to authenticate/grab the tenant-id and not be able to grab anything else? I assumed it could be a role based issue, but changing the roles doesnt seem to affect anything.
Thanks
Solved! Go to Solution.
06-20-2020 06:26 PM
Ok, so not just changing the path before the tenant ID, but the path after the tenant ID as well.
Looks like the path that gives me what I'm looking for is:
https://{{Stealthwatch-SMC}}/sw-reporting/v1/tenants/{{tenant-ID}}/internalHosts/tags
03-25-2020 08:09 AM
Hi there, which version of Stealthwatch are you running?
03-25-2020 08:44 AM
Hey Kyle,
Im currently on 7.0.2 on Prod and Dev. I actually figured out the issue here, the API call was https://{{STEALTHWATCH-SMC}}/smc-configuration/rest/v1/tenants/{{tenant-id}}/tags/ and it turns out the information I was looking for was actually under {{SMC-URL}}/sw-reporting/ and not /smc-configuration/.
The postman collection I got off of developer.cisco.com/stealthwatch/enterprise/ was with the smc-configuration url, but that always 404's for me no matter what call I do. Only sw-reporting/v1 or sw-reporting/v2 works. Got it working now, thanks!
06-19-2020 02:17 PM
I'm having the same problem on SW 7.1.2.
What was the exact URL that worked for you?
06-20-2020 03:59 PM - edited 06-20-2020 04:01 PM
https://{{STEALTHWATCH-SMC}}/sw-reporting/v1/tenants/:tenant-id/customHosts/tags/ was the url I had to use, basically dropping the smc-confugration/rest/ portion and replacing it with sw-reporting.
06-20-2020 06:26 PM
Ok, so not just changing the path before the tenant ID, but the path after the tenant ID as well.
Looks like the path that gives me what I'm looking for is:
https://{{Stealthwatch-SMC}}/sw-reporting/v1/tenants/{{tenant-ID}}/internalHosts/tags
06-22-2020 08:07 AM
Nice! Our customHosts / internalHosts are set up in a strange way so the api doesnt give back information that i'd expect. Glad you got it working!
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: