I have this scenario:
I would like to call report through "rest_v2" service from database. My URL to list resources looks like: http://myserverurl:8081/jasperserver/rest_v2/resources
Q1: How to pass a correct datasource to this report? http://myserverurl:8081/jasperserver/rest_v2/reports/reports/MyTestReport.pdf?j_username=jasperadmin&j_password=jasperadmin
Q2: Is there an option how to authenticate it in more secured way?
I don't think you can pass the datasource with the rest interface (but feel free to check that in the JasperReports-Server-Web-Services-Guide).
What I'd do is copy the report in Jasperserver and link one to datasource AGD and one to AGL. Then you can get your code to call the required report.
It's possible to integrate your application using single sign on so you don't have to pass the login on the url line (or I guess you could also use ssl)
This is covered in the jasperserver authentication cookbook which is available on the jaspersoft community site.