Jump to content
Changes to the Jaspersoft community edition download ×

RESTful using curl on the command line


michaelvitale

Recommended Posts

I am using curl to do RESTful stuff in Jasper Reports, version 5.1  I am having a problem with specifying a collection parameter.  The Web manual says to set the "IsLastValue=true", but how do you specify it and the collection string (really a collection of integer numbers).  See my example below where facility_ids is my collection of numbers that doesn't work.  Turning on debug on tomcat reveals it is still trying to map it to type string and defaults to the first element in the list returned by the query, 5:

 

2013-09-01 11:56:02,335 DEBUG JRJdbcQueryExecuter,http-bio-8080-exec-6:254 - SQL query string: call reports_test.MultipleCancellations_test(?, ?, ?, ?);
2013-09-01 11:56:02,337 DEBUG JRJdbcQueryExecuter,http-bio-8080-exec-6:396 - Parameter #1 (facility_ids_list of type java.lang.String): [5]
2013-09-01 11:56:02,338 DEBUG JRJdbcQueryExecuter,http-bio-8080-exec-6:396 - Parameter #2 (num_cancellations of type java.lang.Integer): 1
2013-09-01 11:56:02,338 DEBUG JRJdbcQueryExecuter,http-bio-8080-exec-6:396 - Parameter #3 (start_dt of type java.util.Date): Mon Jul 01 00:00:00 UTC 2013
2013-09-01 11:56:02,339 DEBUG JRJdbcQueryExecuter,http-bio-8080-exec-6:396 - Parameter #4 (end_dt of type java.util.Date): Wed Jul 31 00:00:00 UTC 2013
 

curl 'http://<my userid>:<my password>@<jasper host>:8080/jasperserver/rest_v2/reports/reports/CSC/MultipleCancellations.csv?parameter%20name=facility_ids%20isListValue=true&facility_ids=2,3&num_cancellations=1&start_dt=2013-07-01&end_dt=2013-07-31'

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...