Create Datasource with REST


Trying to create a Datasource resource on the jasper server thru ReST API.

It is creating the file/Resource with PUT. However, its getting created as Type "Content Resource" not as "JDBC Datasource.

In ResourceDescriptor object, used ResourceDescriptor.TYPE_DATASOURCE_JDBC at setWsType, setDataSourceType and setResourceType.

Resource is getting created on the Jasper server as Type of "Content Resource"  not as "JDBC Data source" Any help is appreciated.

Thank you,


gourish.bhat's picture
Joined: Feb 10 2015 - 8:18pm
Last seen: 4 years 10 months ago

Can you give details on what is that you are passing to the server?

nthapa - 7 years 10 months ago


I have a similar problem creating a resource in this case a jdbc with the url rest_v2/resources/datasources/nameJdbc and sending the json {"jdbcDataSource":{"driverClass":"driverClass","password":"password","username":"username","connectionUrl":"connectionUrl","timezone":"timezone"}} just create me a file here its xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><file><creationDate>2017-08-12T17:36:43</creationDate><label>data</label><permissionMask>1</permissionMask><updateDate>2017-08-12T17:36:43</updateDate><uri>/datasources/data</uri><version>0</version><type>json</type></file>

gary020307 - 5 years 5 months ago

0 Answers:

No answers yet