cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
831
Views
10
Helpful
6
Replies

Stealthwatch API 404 on Get Tags

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

6 REPLIES 6
kywinter
Cisco Employee

Hi there, which version of Stealthwatch are you running?

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!

I'm having the same problem on SW 7.1.2.

What was the exact URL that worked for you?

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.

 

 

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

 

View solution in original post

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!