Gmp.get_tasks() shows only 10 Elements

gmp.get_tasks() shows only 10 Elements … Is there a way to get the task greater then 10?

from gvmtools.helper import Table
response_xml = gmp.get_tasks()

[<Element task at 0x7f0cf3d9ddc0>, <Element task at 0x7f0cf3d9dd00>, <Element task at 0x7f0cf3d9d940>, <Element task at 0x7f0cf3d9dbc0>, <Element task at 0x7f0cf3d9d400>, <Element task at 0x7f0cf3d9da80>, <Element task at 0x7f0cf3d9d480>, <Element task at 0x7f0cf3d9db40>, <Element task at 0x7f0cf3d9dec0>, <Element task at 0x7f0cf3d9df40>]

You just need to set a filter:

Btw. you can import the pretty_print function with
from gvm.xml import pretty_print
This function prints indented xml …


thank you very much … wher do I find this information? :slight_smile:

E.g. here


@y0urself This filter didn’t work in my case, can you help me? Greenbone api return only 10 elements.


Greenbone Security Assistant 21.4.4
Greenbone Vulnerability Manager 21.4.5
OpenVAS 21.4.4
gvm-libs 21.4.4
Operating system:Kali

I need more details. Otherwise I can only guess, which is not very helpful in most cases.
What command have you explicitly called, so I can help you?

Edit: You probably need to use filter_string instead of filter. It just came into my mind, that we changed the API in this case to filter_string, see here.

1 Like

Firstly thank you for answer me.

I have 59 tasks and all the names match with the string “app”. I’m using tasks = gmp.get_tasks(filter_string=‘app’) and I receive just 10 elements

Here you can see, that you need to specify your filter a little bit more detailed.
As for your particular situation, you can probably go with

tasks = gmp.get_tasks(filter_string="name~app and rows=-1") # -1 in this case means all
1 Like


Thank you very much… It was so simple and I was trying much more complex things.