→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

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

2 REPLIES 2
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!