Using REST v2 API to create/List MongoDB Data Source

0

Hi,

I'm trying to add a new MongoDB Datasource via REST v2 Webservers. I have successfully added a MySQL source, but cannot find any documentation or guidance on how to add a MongoDB source. I'm assuming it is similar but I am unsure as to the 'driverClass' to provide?

Can anyone provide any help or guidance on where in the documentation to look?

Thanks,

Chris

brommycanary's picture
Joined: Mar 21 2012 - 1:10am
Last seen: 1 month 5 days ago

2 Answers:

1

I managed to work it out in the end. You provide the following:

  • 'dataSourceName' as 'MongoDbDataSource'
  • 'connectionType' as 'application/repository.customDataSource+json'
  • 'properties' array containing a KVP of 'mongoURI' as the connection URL for the Mongo DB

And the content-Type in the header as 'application/repository.customDataSource+json'.

That then all worked!

brommycanary's picture
Joined: Mar 21 2012 - 1:10am
Last seen: 1 month 5 days ago
0
A3an's picture
65
Joined: Apr 10 2016 - 3:13am
Last seen: 4 days 17 hours ago
Feedback
randomness