User_tags missing in report XML response?

Is the report/user_tags/tag/name data missing at the report result?

        reports = gmp.get_reports(
            filter_string=f"task_id={task_id} and status=Done "
                          "sort-reverse=date"
        ).xpath("report")

The reports[0].xpath("report/user_tags")[0] has only count,tag/name is missing (required for delta mails):

   </filters>
   <user_tags>
   	<count>3</count>
   </user_tags>
   <scan_run_status>Done</scan_run_status>

Could you try setting details=True as argument for get_reports? The protocol doc says it’s required for getting the tags.

grafik

I can add details=True and ignore_pagination=True, but the tags are is still missing.

Ok in that case i think you can only get the tags for a single report.

Thanks, could you provide an example how to fix this ?
Is reports[0].xpath("report")[0] not a single report view?

You are using the get_reports method. You need to use get_report.

2 Likes