Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have used the example from the Geoserver REST Docs to add a datastore from at PostGIS database. I have used the following xml doc to add the new datastore:

<dataStore>
  <name>my_datastore</name>
  <connectionParameters>
    <host>localhost</host>
    <port>5432</port>
    <database>postgis</database>
    <user>username</user>
    <passwd>secret</passwd>
    <schema>public</schema>
    <dbtype>postgis</dbtype>
  </connectionParameters>
</dataStore>

The datastore was created with the connection parameters as I expected. But the datastore.xml created looks different from the datastore that I have created with the GeoServer Web Admin. The connection parameters I am missing is:

  • Connection timeout
  • validate connections
  • max connections
  • Loose bbox
  • Expose primary keys
  • fetch size
  • Max open prepared statements
  • preparedStatements
  • Estimated extends
  • min connections

So my question is: What are the above mentioned connection parameters corresponding xml elements?

EDIT: I am using GeoServer 2.1-RC1.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You can specify them exactly like they are specified in the datastore.xml. The REST api allows for multiple syntaxes in connectionParameters. The following syntaxes are equivalent:

<port>5432</port>
<entry key="port">5432</entry>

You will find a description of what those additional parameters mean in the user guide.

share|improve this answer

I think you can include any element in the datastore.xml file using the same format. All the RESTConfig does is copy your POSTed file to the datastore folder.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.