Alternative to FIRST_REPORT tag in get_tasks response


I use python-gvm for starting tasks / getting reports over the API.
To get a report, I use the get_reports call with the respective report_id.

To get the report_id of the latest report of a task, I use the get_tasks command and filter out the entry of the FIRST_REPORT tag in the XML response.

Now I read that the FIRST_REPORT and SECOND_LAST_REPORT tags are deprecated soon and the get_reports function with a suitable filter shall be used instead.

My question is: how should this filter look like, to become the latest report from a task? I didn’t see any possiblity in the GMP API documentation.


We are using <last_report> in GSA.

1 Like

OK, then I understood the terminology wrong… last_report should be fine. And what about the <second_last_report> ? For example when I want to create a delta?

<get_reports filter="task_id='uuid' sort-reverse=date rows=2"/> to get the last two reports for a specific task.