#1 2017-09-26 18:19:09

rairakesh
Member
Registered: 2017-09-26

Rest API or API Integration DOcumentation?

I have a custom application where I want to call Rest API's to Bitnami Server and integrate the report.
How to integrate reports created in Bitnami Report server through API into our Custom application

Offline

#2 2017-09-27 07:36:01

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Rest API or API Integration DOcumentation?

Hi raikakesh,

you could, as you are in your thread https://forum.reportserver.net/viewtopic.php?id=955, create the correct url from your application and just call the URLs from your application.

Best regards,
Eduardo

Offline

#3 2017-10-13 19:17:30

rairakesh
Member
Registered: 2017-09-26

Re: Rest API or API Integration DOcumentation?

Can you point me to the API reference or any Java Docs or PDF's you have.. ?

Last edited by rairakesh (2017-10-13 19:20:56)

Offline

#4 2017-10-17 09:49:15

Rodion
Member
Registered: 2017-05-17

Re: Rest API or API Integration DOcumentation?

Hello raikakesh,

linked with your issue at "https://forum.reportserver.net/viewtopic.php?id=955", as already noticed, you can execute reports via URL.

How to do this, you got the correct link : "https://reportserver.net/en/guides/admi … a-the-URL/"

I have noticed that in all of your execution urls you never used httpauthexport?id=reportID .
This is an option to execute reports without being logged in.

Further you could find answers here "https://forum.reportserver.net/viewtopic.php?id=953"
There was the problem of executing a report with a date parameter via URL. Not exact the same issue like yours, but there you can find for example an url-pattern.

The final url-pattern :
http://localhost/reportserver/reportserver/httpauthexport?id=ReportID&user=username&apikey=yourApiKey&p_key1=2017-09-26&format=HTML&download=false
--> p_key1 is the date-parameter. You can leave it out or insert own parameter
--> You can also leave some options out or add new and experiment

Be aware, that you should update your parameters.cf in ReportServer if you want to set up a date parameter.
You can also find the explanation in the link, here is the shortcut :
"You have to change the configuration file: datasources/parameter.cf , set your urlpattern ( <urlpattern>yyyy-MM-dd</urlpattern> ) and then "config reload" with your terminal"


If you still have problems, dont hesitate to contact us.
In case a report cant be executed by the url, please provide also the reportfile so that we can adjust the problem.

Best regards,
Rodion

Offline

#5 2017-10-30 04:56:15

rairakesh
Member
Registered: 2017-09-26

Re: Rest API or API Integration DOcumentation?

HI Rodion,
Have few questions related to "yourApiKey"
and datasources/parameter.cf location in Bitnami Community edition.

How to generate yourAPIKey?
where is the fie on local : datasources/parameter.cf

The final url-pattern  you mentioned : Does that need SSO configuration OR will that work easily on Bitnami Community edition?
http://localhost/reportserver/reportserver/httpauthexport?id=ReportID&user=username&apikey=yourApiKey&p_key1=2017-09-26&format=HTML&download=false

Offline

#6 2017-10-30 07:53:49

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Rest API or API Integration DOcumentation?

Hi rairakesh,

the apikey is just a user property with the name "apikey" and your desired value. Check here for this: https://reportserver.net/en/guides/admi … a-the-URL/

"Define the API Key and Define Appropriate Permissions
To define an API key for a user go to the user management view and select the user in question. Then select the tab Use Properties and add a new property called apikey. As value, you can use any string (preferably a random string that is on the longish side).

The user does not require a password, or any unusual permissions. The only permissions required are the execute permission on those reports that you plan to embed. Suppose, that we have specified the apikey 79PKXGScP8r8 on a fresh user exportuser which has no permissions except the permission to execute report 5000. Then, when everything goes right, then

http://SERVER:PORT/reportserverbasedir/reportserver/httpauthexport?id=5000&user=exportuser&apikey=79PKXGScP8r8&format=HTML&download=false

should execute the report with id 5000 and user exportuser."

You can find the datasources/parameter.cf file in the internal file system. Check https://reportserver.net/en/guides/admi … le-System/ for this.
Here you can find information on this file:
https://reportserver.net/en/guides/conf … rametercf/
You can change the urlpattern to: <urlpattern>yyyy-MM-dd</urlpattern> , open your terminal by CTRL+ALT+T (https://reportserver.net/en/guides/admin/chapters/Terminal/ ) and then write "config reload" to load the new configuration. Alternatively, you can restart reportserver, for example by restarting your tomcat.

The final url-pattern should work with community edition.

Regards,
Eduardo

Offline

#7 2017-10-30 18:38:08

rairakesh
Member
Registered: 2017-09-26

Re: Rest API or API Integration DOcumentation?

Finally was able to test few reports on my local

http://localhost:8580/reportserver/reportserver/httpauthexport?id=3348&user=user&apikey=apikeyfortesting&format=HTML&download=false
and
http://localhost:8580/reportserver/reportserver/httpauthexport?id=3703&user=user&apikey=apikeyfortesting&format=HTML&download=false

API Key can be modified at : API Key > Administration > User Root > Administration > Last name / firstname :

The id can be obtained by selecting The Report (after executing the report, you  can see the id)

IMP : One issue I faced thought after trying using API key, tried to login again http://localhost/reportserver/ , I enter my user name and password that I did before accessing though API Key but : I get  Login attempt failed.

What might have caused the login to fail where as all above mentioned Reports are accessible through API Key even when I am not logged in.

Login scenario does not work at all.
Thanks
Rakesh

Last edited by rairakesh (2017-10-31 05:06:10)

Offline

#8 2017-11-01 01:59:54

rairakesh
Member
Registered: 2017-09-26

Re: Rest API or API Integration DOcumentation?

Hi Eduardo
Could you help us with the login fails after successful retrieval of reports using API key as stated above.
Thanks
Rakesh

Offline

#9 2017-11-01 10:45:16

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Rest API or API Integration DOcumentation?

Hi Rakesh,

if I understand correctly, you can not log in after opening a report using API Keys ? This is very strange. Are you completely sure you are using the correct password ? And, if you restart tomcat, are you being able to log in?

Regards,
Eduardo

Offline

#10 2017-11-01 16:13:43

rairakesh
Member
Registered: 2017-09-26

Re: Rest API or API Integration DOcumentation?

HI Eduardo,
I did everything as you suggested earlier. None of them worked. Only option left is to uninstall and reinstall Bitnami Community Edition again.
Thanks
Rakesh

Offline

#11 2017-11-02 07:52:20

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Rest API or API Integration DOcumentation?

Hi Rakesh,

what did I suggest? what do you mean? I only asked if after restarting tomcat you are still not being able to log-in. Is this not the case?

Regards,
Eduardo

Offline

#12 2017-11-15 09:03:42

Satish
Member
Registered: 2017-11-10

Re: Rest API or API Integration DOcumentation?

Can I Schedule Job from My Custom Application?

Offline

#13 2017-12-07 10:02:36

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Rest API or API Integration DOcumentation?

Hi Satish,

you can write a groovy script that schedules a job. Then, you can call this script from within your application by calling the script by URL. More information here: https://reportserver.net/en/guides/scri … rs/Basics/ :3.2. Executing Scripts via URL

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB