Data source files are written in the JSON language.
Every data source must include server and port keys. All other settings are optional. If name and id are not included, they are both given the name of the file defining the data source by default. For example, a file named parts.json results in a data source with the name and id "parts." The id cannot contain spaces. Therefore, if you do not specify an explicit id, make sure that your file name does not contain any spaces.
The name setting is normally the only user-visible identification of a data source. The id setting is only used internally, and the description setting is only used for logging and debugging.
The following example shows a JSON data source file based on wine merchant data.
{ "server":"server01.lab.acme.com", "port":"15000", "apiVersion" : "ENE_QUERY", "sslConfig": { "caFile":"truststore.ks", "caPassword":"endeca", "certFile":"keystore.ks", "certPassword":"endeca" } "id":"ds-id", "name":"Descriptive DataSource name", "description":"Detailed information about this DataSource", "baseFunctions": [ { "class":"com.endeca.portal.data.functions.RecordFilter" "recordFilter":"Regions:Midwest" }, { "class":"com.endeca.portal.data.functions.RangeFilter" "property":"P_Price", "rangeOperator":"GTEQ", "value1": "25" }, { "class":"com.endeca.portal.data.functions.RefinementFilter" "dimValId":"123", "dimensionId":"121" } ], "securityEnabled": "true", "inheritSecurity": "true", "securityFilters": { "frenchFilter": { "class":"com.endeca.portal.data.functions.RecordFilter", "recordFilter":"OR(Region:Bordeaux,Region:Burgundy)" } }, "rolePermissions": { "French Wine": ["frenchFilter"] } }