Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DiegoPacini
Product Team
Product Team

We've added a new query in our Public API to retrieve Vulnerabilities data from your sites!

Check it out here and start using it today!

https://docs.lansweeper.com/docs/api/vulnerabilities

 

1 ACCEPTED SOLUTION
Krish
Engaged Sweeper II

^ To the above post if anyone else has issues, this was resolved by making sure to include page: "NEXT" in your query with each next page key. Whereas for assets without the "NEXT" it was working fine but for vulnerabilities it's required in order to go to the next page. 

Thank you, Lansweeper Support, for the quick help!

View solution in original post

8 REPLIES 8
GreyRed
Engaged Sweeper II

Hello,
How can I filter out only the vulnerabilities that are not on the 'ignored' list and were not found on 'ignored' assets?

The query returns only the active vulnerabilities. If this doesn't happen for your site, please let us know

GreyRed
Engaged Sweeper II

I doble-checked the topic and came to this conclusion: 
- if I set the vulnerability on the "ignored' list, it did't reporterd by API anymore
- if I set the Asset to the "ignored" list, the referred vuln's still did reported by API
How can I resolve this issue?
Thank you

A vulnerability is present in the list returned by the API if there is at least one asset affected by that vulnerability. So if you ignore an asset, its vulnerabilities will disappear from the list (not ignored) only if that was the only asset affected by them. 

GreyRed
Engaged Sweeper II

This is obviously true, but I have vulnerabilities (1 for Pycharm and 81 for Exchange Server), that definitely referenced to respective one asset. Both assets are on "ignored" list, but the vulnerabilities are still reported by API.

I'll look into it and in case we'll open a bug. thanks for the feedback. 

Krish
Engaged Sweeper II

Hi Diego,

I was testing out the vulnerabilities API, seems like the pagination isn't properly working or maybe I'm understanding it incorrectly.

For example, here's the response I'm receiving from the endpoint:

"data": {
        "site": {
            "vulnerabilities": {
                "total": 4550,
                "pagination": {
                    "limit": 1,
                    "current": "eyJvZmZzZXQiOjAsInRvdGFsUmVzdWx0cyI6NDU1MH0=",
                    "next": "eyJvZmZzZXQiOjAsInRvdGFsUmVzdWx0cyI6NDU1MH0=",
                    "page": "FIRST"
                },
...

The current and the next are the same value? How would I change cursor to go to the next page?

In your documentation it also shows your current and next values are the same as well:

Krish_0-1696620705360.png

I can't seem to find a proper way of paginating although for assets it's working fine. Can you verify this? Thanks

Krish
Engaged Sweeper II

^ To the above post if anyone else has issues, this was resolved by making sure to include page: "NEXT" in your query with each next page key. Whereas for assets without the "NEXT" it was working fine but for vulnerabilities it's required in order to go to the next page. 

Thank you, Lansweeper Support, for the quick help!