Skip to content
Guido Barbaglia edited this page May 26, 2015 · 9 revisions

The datasources made available by WDS are configured through the JSON file stored in:

/src/main/webapp/datasources/datasources.json

Each object in this file describes a datasource as per the example below:

[
   {
      "id"        :   "MYDATASOURCE",
      "driver"    :   "PostgreSQL",
      "url"       :   "jdbc:postgresql://127.0.0.1:5432/my_datasource",
      "dbName"    :   "my_db",
      "username"  :   "my_username",
      "password"  :   "my_password",
      "create"    :   false,            
      "retrieve"  :   true,
      "update"    :   false,
      "delete"    :   false
   }
]

Each object has the following properties:

Name Description Example
id Unique name for the datasource. This name will be used in the REST services to access the DB. MYDATASOURCE
driver Type of connector to be used.
  • PostgreSQL
  • SQLServer2000
  • MongoDB
  • OrientDB
    url JDBC string for the datasource. jdbc:postgresql://127.0.0.1:5432/my_datasource
    dbName The name of the database as is in the DBMS. my_db
    username Username to access the DBMS. my_username
    password Password to access the DBMS. my_password
    create Grant the privilege to create resources in the datasource. true
    false (default)
    retrieve Grant the privilege to retirve resources from the datasource. true (default)
    false
    update Grant the privilege to update resources in the datasource. true
    false (default)
    delete Grant the privilege to delete resources from the datasource. true
    false (default)
    Clone this wiki locally