GeoServer Data Stores

A data store contains vector format spatial data. It can be a file (such as a shapefile), a database (such as PostGIS), or a server (such as a remote Web Feature Service).
More information: http://geoserver.org/comm/
Contact Info: geoserver-users@sourceforge.net
Version: 1.0.0
BasePath:/geoserver/rest
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

DataStores

DataStores

Up
post /workspaces/{workspaceName}/appschemastores/{storeName}/cleanSchemas
Cleans all MongoDB internal stores Schemas for an App-Schema store. (cleanAllMongoSchemas)
Cleans all MongoDB internal stores Schemas for an App-Schema store.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data stores.
storeName (required)
Path Parameter — The name of the App-Schema store

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

Up
post /workspaces/{workspaceName}/appschemastores/{storeName}/datastores/{internalStoreId}/cleanSchemas
Cleans a MongoDB internal store Schemas for an App-Schema store. (cleanMongoSchema)
Cleans a MongoDB internal store Schemas for an App-Schema store.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data stores.
storeName (required)
Path Parameter — The name of the App-Schema store
internalStoreId (required)
Path Parameter — The store ID for the internal MongoDB store as specified on App-Schema Mappings.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

Up
delete /workspaces/{workspaceName}/datastores/{storeName}/{method}.{format}
(deleteDataStoreUpload)
Invalid, only used for uploads

Responses

405

Method Not Allowed

Up
delete /workspaces/{workspaceName}/datastores/{storeName}
Delete data store (deleteDatastore)
Deletes a data store from the server.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data store.
storeName (required)
Path Parameter — The name of the data store to delete.

Query parameters

recurse (optional)
Query Parameter — The recurse controls recursive deletion. When set to true all resources contained in the store are also removed. The default value is "false".

Responses

200

OK

Up
delete /workspaces/{workspaceName}/datastores
(deletedatastores)
Invalid. Use /datastores/{datastore} instead.

Responses

405

Method Not Allowed

Up
get /workspaces/{workspaceName}/datastores/{storeName}
Retrieve a particular data store from a workspace (getDataStore)
Controls a particular data store in a given workspace. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/datastores/{datastore}.xml" for XML).

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data store.
storeName (required)
Path Parameter — The name of the data store to retrieve.

Query parameters

quietOnNotFound (optional)
Query Parameter — The quietOnNotFound parameter avoids logging an exception when the data store is not present. Note that 404 status code will still be returned.

Return type

datastore

Example data

Content-Type: application/xml
"\n  sf\n  true\n  \n    sf\n    \n  \n  \n    file:data/sf\n    http://www.openplans.org/spearfish\n  \n  <__default>false\n  \n    \n  \n\n"

Example data

Content-Type: application/json
"{\"dataStore\":{\"name\":\"sf\",\"enabled\":true,\"workspace\":{\"name\":\"sf\",\"href\":\"http://localhost:8080/geoserver/rest/workspaces/sf.json\"},\"connectionParameters\":{\"entry\":[{\"@key\":\"url\",\"$\":\"file:data/sf\"},{\"@key\":\"namespace\",\"$\":\"http://www.openplans.org/spearfish\"}]},\"_default\":false,\"featureTypes\":\"http://localhost:8080/geoserver/rest/workspaces/sf/datastores/sf/featuretypes.json\"}}\n"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK datastore

Example data

Content-Type: application/xml

  sf
  true
  
    sf
    
  
  
    file:data/sf
    http://www.openplans.org/spearfish
  
  <__default>false
  
    
  

Example data

Content-Type: application/json
{"dataStore":{"name":"sf","enabled":true,"workspace":{"name":"sf","href":"http://localhost:8080/geoserver/rest/workspaces/sf.json"},"connectionParameters":{"entry":[{"@key":"url","$":"file:data/sf"},{"@key":"namespace","$":"http://www.openplans.org/spearfish"}]},"_default":false,"featureTypes":"http://localhost:8080/geoserver/rest/workspaces/sf/datastores/sf/featuretypes.json"}}

Up
get /workspaces/{workspaceName}/datastores/{storeName}/{method}.{format}
(getDataStoreUpload)
Deprecated. Retrieve the underlying files for the data store as a zip file with MIME type application/zip

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data store.
storeName (required)
Path Parameter — The name of the store to be retrieved
method (required)
Path Parameter — The upload method. Can be "url", "file", "external". Unused for GET
format (required)
Path Parameter — The type of source data store (e.g., "shp"). Unused for GET

Responses

200

OK

Up
get /workspaces/{workspaceName}/datastores
Get a list of data stores (getDatastores)
List all data stores in workspace ws. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/datastores.xml" for XML)

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data stores.

Return type

dataStoreResponse

Example data

Content-Type: application/xml
"\n  sf\n  \n\n"

Example data

Content-Type: application/json
"{\"dataStores\":{\"dataStore\":[{\"name\":\"sf\",\"href\":\"http://localhost:8080/geoserver/rest/workspaces/sf/datastores/sf.json\"}]}}\n"

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK dataStoreResponse

Example data

Content-Type: application/xml

  sf
  

Example data

Content-Type: application/json
{"dataStores":{"dataStore":[{"name":"sf","href":"http://localhost:8080/geoserver/rest/workspaces/sf/datastores/sf.json"}]}}

Up
post /workspaces/{workspaceName}/datastores/{storeName}/{method}.{format}
(postDataStoreUpload)
Invalid, use PUT for uploads

Responses

405

Method Not Allowed

Up
post /workspaces/{workspaceName}/datastores/{storeName}
(postDatastore)
Invalid. Use PUT to edit a data store definition, or POST with /datastore to add a new definition.

Responses

405

Method Not Allowed

Up
post /workspaces/{workspaceName}/datastores
Create a new data store (postDatastores)
Adds a new data store to the workspace.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data stores.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

dataStoreBody datastore (required)
Body Parameter

The data store body information to upload.

The contents of the connection parameters will differ depending on the type of data store being added.

  • GeoPackage

    Examples:

    • application/xml:

      <dataStore>
        <name>nyc</name>
        <connectionParameters>
          <database>file:///path/to/nyc.gpkg</database>
          <dbtype>geopkg</dbtype>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "name": "nyc",
          "connectionParameters": {
            "entry": [
              {"@key":"database","$":"file:///path/to/nyc.gpkg"},
              {"@key":"dbtype","$":"geopkg"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | Primary key metadata table | The optional table containing primary key structure and sequence associations. Can be expressed as 'schema.name' or just 'name' | user | String | False | | | Callback factory | Name of JDBCReaderCallbackFactory to enable on the data store | user | String | False | | | Evictor tests per run | number of connections checked by the idle connection evictor for each of its runs (defaults to 3) | user | Integer | False | 3 | | database | Database | user | File | True | | | Batch insert size | Number of records inserted in the same batch (default, 1). For optimal performance, set to 100. | user | Integer | False | 1 | | fetch size | number of records read with each interaction with the DBMS | user | Integer | False | 1000 | | Connection timeout | number of seconds the connection pool will wait before timing out attempting to get a new connection (default, 20 seconds) | user | Integer | False | 20 | | namespace | Namespace prefix | user | String | False | | | max connections | maximum number of open connections | user | Integer | False | 10 | | Test while idle | Periodically test the connections are still valid also while idle in the pool | user | Boolean | False | True | | Max connection idle time | number of seconds a connection needs to stay idle for the evictor to consider closing it | user | Integer | False | 300 | | Session startup SQL | SQL statement executed when the connection is grabbed from the pool | user | String | False | | | validate connections | check connection is alive before using it | user | Boolean | False | True | | dbtype | Type | program | String | True | geopkg | | passwd | password used to login | user | String | False | | | Expose primary keys | Expose primary key columns as attributes of the feature type | user | Boolean | False | False | | min connections | minimum number of pooled connections | user | Integer | False | 1 | | Evictor run periodicity | number of seconds between idle object evictor runs (default, 300 seconds) | user | Integer | False | 300 | | Session close-up SQL | SQL statement executed when the connection is released to the pool | user | String | False | | | user | user name to login as | user | String | False | |

  • PostGIS

    Examples:

    • application/xml:

      <dataStore>
        <name>nyc</name>
        <connectionParameters>
          <host>localhost</host>
          <port>5432</port>
          <database>nyc</database>
          <user>bob</user>
          <passwd>postgres</passwd>
          <dbtype>postgis</dbtype>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "name": "nyc",
          "connectionParameters": {
            "entry": [
              {"@key":"host","$":"localhost"},
              {"@key":"port","$":"5432"},
              {"@key":"database","$":"nyc"},
              {"@key":"user","$":"bob"},
              {"@key":"passwd","$":"postgres"},
              {"@key":"dbtype","$":"postgis"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | Connection timeout | number of seconds the connection pool will wait before timing out attempting to get a new connection (default, 20 seconds) | user | Integer | False | 20 | | validate connections | check connection is alive before using it | user | Boolean | False | True | | port | Port | user | Integer | True | 5432 | | Primary key metadata table | The optional table containing primary key structure and sequence associations. Can be expressed as 'schema.name' or just 'name' | user | String | False | | | Support on the fly geometry simplification | When enabled, operations such as map rendering will pass a hint that will enable the usage of ST_Simplify | user | Boolean | False | True | | create database | Creates the database if it does not exist yet | advanced | Boolean | False | False | | create database params | Extra specifications appended to the CREATE DATABASE command | advanced | String | False | `` | | dbtype | Type | program | String | True | postgis | | Batch insert size | Number of records inserted in the same batch (default, 1). For optimal performance, set to 100. | user | Integer | False | 1 | | namespace | Namespace prefix | user | String | False | | | Max connection idle time | number of seconds a connection needs to stay idle for the evictor to consider closing it | user | Integer | False | 300 | | Session startup SQL | SQL statement executed when the connection is grabbed from the pool | user | String | False | | | Expose primary keys | Expose primary key columns as attributes of the feature type | user | Boolean | False | False | | min connections | minimum number of pooled connections | user | Integer | False | 1 | | Max open prepared statements | Maximum number of prepared statements kept open and cached for each connection in the pool. Set to 0 to have unbounded caching, to -1 to disable caching | user | Integer | False | 50 | | Callback factory | Name of JDBCReaderCallbackFactory to enable on the data store | user | String | False | | | passwd | password used to login | user | String | False | | | encode functions | set to true to have a set of filter functions be translated directly in SQL. Due to differences in the type systems the result might not be the same as evaluating them in memory, including the SQL failing with errors while the in memory version works fine. However this allows us to push more of the filter into the database, increasing performance of the postgis table. | advanced | Boolean | False | False | | host | Host | user | String | True | localhost | | Evictor tests per run | number of connections checked by the idle connection evictor for each of its runs (defaults to 3) | user | Integer | False | 3 | | Loose bbox | Perform only primary filter on bbox | user | Boolean | False | True | | Evictor run periodicity | number of seconds between idle object evictor runs (default, 300 seconds) | user | Integer | False | 300 | | Estimated extends | Use the spatial index information to quickly get an estimate of the data bounds | user | Boolean | False | True | | database | Database | user | String | False | | | fetch size | number of records read with each interaction with the DBMS | user | Integer | False | 1000 | | Test while idle | Periodically test the connections are still valid also while idle in the pool | user | Boolean | False | True | | max connections | maximum number of open connections | user | Integer | False | 10 | | preparedStatements | Use prepared statements | user | Boolean | False | False | | Session close-up SQL | SQL statement executed when the connection is released to the pool | user | String | False | | | schema | Schema | user | String | False | public | | user | user name to login as | user | String | True | |

  • Shapefile

    Examples:

    • application/xml:

      <dataStore>
        <name>nyc</name>
        <connectionParameters>
          <url>file:/path/to/nyc.shp</url>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "name": "nyc",
          "connectionParameters": {
            "entry": [
              {"@key":"url","$":"file:/path/to/nyc.shp"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | cache and reuse memory maps | only memory map a file one, then cache and reuse the map | advanced | Boolean | False | True | | namespace | URI to the namespace | advanced | URI | False | | | filetype | Discriminator for directory stores | program | String | False | shapefile | | charset | character used to decode strings from the DBF file | advanced | Charset | False | ISO-8859-1 | | create spatial index | enable/disable the automatic creation of spatial index | advanced | Boolean | False | True | | fstype | Enable using a setting of 'shape'. | advanced | String | False | shape | | url | url to a .shp file | user | URL | True | | | enable spatial index | enable/disable the use of spatial index for local shapefiles | advanced | Boolean | False | True | | memory mapped buffer | enable/disable the use of memory-mapped IO | advanced | Boolean | False | False | | timezone | time zone used to read dates from the DBF file | advanced | TimeZone | False | Pacific Standard Time |

  • Directory of spatial files (shapefiles)

    Examples:

    • application/xml:

      <dataStore>
        <name>nyc</name>
        <connectionParameters>
          <url>file:/path/to/directory</url>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "name": "nyc",
          "connectionParameters": {
            "entry": [
              {"@key":"url","$":"file:/path/to/directory"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | cache and reuse memory maps | only memory map a file one, then cache and reuse the map | advanced | Boolean | False | True | | namespace | URI to the namespace | advanced | URI | False | | | filetype | Discriminator for directory stores | program | String | False | shapefile | | charset | character used to decode strings from the DBF file | advanced | Charset | False | ISO-8859-1 | | create spatial index | enable/disable the automatic creation of spatial index | advanced | Boolean | False | True | | fstype | Enable using a setting of 'shape'. | advanced | String | False | shape | | url | url to a .shp file | user | URL | True | | | enable spatial index | enable/disable the use of spatial index for local shapefiles | advanced | Boolean | False | True | | memory mapped buffer | enable/disable the use of memory-mapped IO | advanced | Boolean | False | False | | timezone | time zone used to read dates from the DBF file | advanced | TimeZone | False | Pacific Standard Time |

  • Web Feature Service

    Examples:

    • application/xml:

      <dataStore>
        <name>nyc</name>
        <connectionParameters>
          <GET_CAPABILITIES_URL>http://localhost:8080/geoserver/wfs?request=GetCapabilities</GET_CAPABILITIES_URL>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "name": "nyc",
          "connectionParameters": {
            "entry": [
              {"@key":"GET_CAPABILITIES_URL","$":"http://localhost:8080/geoserver/wfs?request=GetCapabilities"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | Protocol | Sets a preference for the HTTP protocol to use when requesting WFS functionality. Set this value to Boolean.TRUE for POST, Boolean.FALSE for GET or NULL for AUTO | user | Boolean | False | | | WFS GetCapabilities URL | Represents a URL to the getCapabilities document or a server instance. | user | URL | False | | | Buffer Size | This allows the user to specify a buffer size in features. This param has a default value of 10 features. | user | Integer | False | 10 | | Filter compliance | Level of compliance to WFS specification (0-low,1-medium,2-high) | user | Integer | False | | | EntityResolver | Sets the entity resolver used to expand XML entities | program | EntityResolver | False | org.geotools.xml.PreventLocalEntityResolver@75e98519 | | Time-out | This allows the user to specify a timeout in milliseconds. This param has a default value of 3000ms. | user | Integer | False | 3000 | | GmlComplianceLevel | Optional OGC GML compliance level required. | user | Integer | False | 0 | | Lenient | Indicates that datastore should do its best to create features from the provided data even if it does not accurately match the schema. Errors will be logged but the parsing will continue if this is true. Default is false | user | Boolean | False | False | | Password | This allows the user to specify a username. This param should not be used without the USERNAME param. | user | String | False | | | Use Default SRS | Use always the declared DefaultSRS for requests and reproject locally if necessary | advanced | Boolean | False | False | | Namespace | Override the original WFS type name namespaces | advanced | String | False | | | Username | This allows the user to specify a username. This param should not be used without the PASSWORD param. | user | String | False | | | Axis Order Filter | Indicates axis order used by the remote WFS server for filters. It applies only to WFS 1.x.0 servers. Default is the same as AXIS_ORDER | advanced | String | False | | | GmlCompatibleTypeNames | Use Gml Compatible TypeNames (replace : by _). | user | Boolean | False | False | | Maximum features | Positive integer used as a hard limit for the number of Features to retrieve for each FeatureType. A value of zero or not providing this parameter means no limit. | user | Integer | False | 0 | | Axis Order | Indicates axis order used by the remote WFS server in result coordinates. It applies only to WFS 1.x.0 servers. Default is Compliant | advanced | String | False | Compliant | | WFS Strategy | Override WFS strategy with either cubwerx, ionic, mapserver, geoserver, strict, nonstrict or arcgis strategy. | user | String | False | auto | | Try GZIP | Indicates that datastore should use gzip to transfer data if the server supports it. Default is true | user | Boolean | False | True | | Encoding | This allows the user to specify the character encoding of the XML-Requests sent to the Server. Defaults to UTF-8 | user | String | False | UTF-8 | | Outputformat | This allows the user to specify an output format, different from the default one. | advanced | String | False | |

Return type

String

Example data

Content-Type: application/xml
aeiou

Example data

Content-Type: application/json
""

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Created String

Up
put /workspaces/{workspaceName}/datastores/{storeName}/{method}.{format}
Uploads files to the data store, creating it if necessary (putDataStoreUpload)
Creates or modifies a single data store by uploading spatial data or mapping configuration (in case an app-schema data store is targeted) files.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the coverage stores.
storeName (required)
Path Parameter — The name of the store to be retrieved
method (required)
Path Parameter — The upload method. Can be "url", "file", "external". "file" uploads a file from a local source. The body of the request is the file itself. "url" uploads a file from an remote source. The body of the request is a URL pointing to the file to upload. This URL must be visible from the server. "external" uses an existing file on the server. The body of the request is the absolute path to the existing file.
format (required)
Path Parameter — The type of source data store (e.g., "shp").

Query parameters

configure (optional)
Query Parameter — The configure parameter controls if a coverage/layer are configured upon file upload, in addition to creating the store. It can have a value of "none" to avoid configuring coverages.
target (optional)
Query Parameter — The type of target data store (e.g., "shp"). Same as format if not provided.
update (optional)
Query Parameter — The update mode. If "overwrite", will overwrite existing data. Otherwise, will append to existing data.
charset (optional)
Query Parameter — The character set of the data.
filename (optional)
Query Parameter — The filename parameter specifies the target file name for the file to be uploaded. This is important to avoid clashes with existing files.

Responses

200

The data store was successfully updated.

Up
put /workspaces/{workspaceName}/datastores/{storeName}
Modify a data store. (putDatastore)
Modify data store ds. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/datastores/{ds}.xml" for XML).

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data store.
storeName (required)
Path Parameter — The name of the data store to modify.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

dataStoreBody datastore (required)
Body Parameter

The updated data store definition. For a PUT, only values which should be changed need to be included. The connectionParameters map counts as a single value, so if you change it all pre-existing connection parameters will be overwritten.

The contents of the connection parameters will differ depending on the type of data store being added.

  • GeoPackage

    Examples:

    • application/xml:

      <dataStore>
        <description>A data store</description>
        <enabled>true</enabled>
        <__default>true</__default>
        <connectionParameters>
          <database>file:///path/to/nyc.gpkg</database>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "description": "A data store",
          "enabled": "true",
          "_default": "true",
          "connectionParameters": {
            "entry": [
              {"@key":"database","$":"file:///path/to/nyc.gpkg"},
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | Primary key metadata table | The optional table containing primary key structure and sequence associations. Can be expressed as 'schema.name' or just 'name' | user | String | False | | | Callback factory | Name of JDBCReaderCallbackFactory to enable on the data store | user | String | False | | | Evictor tests per run | number of connections checked by the idle connection evictor for each of its runs (defaults to 3) | user | Integer | False | 3 | | database | Database | user | File | True | | | Batch insert size | Number of records inserted in the same batch (default, 1). For optimal performance, set to 100. | user | Integer | False | 1 | | fetch size | number of records read with each interaction with the DBMS | user | Integer | False | 1000 | | Connection timeout | number of seconds the connection pool will wait before timing out attempting to get a new connection (default, 20 seconds) | user | Integer | False | 20 | | namespace | Namespace prefix | user | String | False | | | max connections | maximum number of open connections | user | Integer | False | 10 | | Test while idle | Periodically test the connections are still valid also while idle in the pool | user | Boolean | False | True | | Max connection idle time | number of seconds a connection needs to stay idle for the evictor to consider closing it | user | Integer | False | 300 | | Session startup SQL | SQL statement executed when the connection is grabbed from the pool | user | String | False | | | validate connections | check connection is alive before using it | user | Boolean | False | True | | dbtype | Type | program | String | True | geopkg | | passwd | password used to login | user | String | False | | | Expose primary keys | Expose primary key columns as attributes of the feature type | user | Boolean | False | False | | min connections | minimum number of pooled connections | user | Integer | False | 1 | | Evictor run periodicity | number of seconds between idle object evictor runs (default, 300 seconds) | user | Integer | False | 300 | | Session close-up SQL | SQL statement executed when the connection is released to the pool | user | String | False | | | user | user name to login as | user | String | False | |

  • PostGIS

    Examples:

    • application/xml:

      <dataStore>
        <description>A data store</description>
        <enabled>true</enabled>
        <__default>true</__default>
        <connectionParameters>
          <host>localhost</host>
          <port>5432</port>
          <database>nyc</database>
          <user>bob</user>
          <passwd>postgres</passwd>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "description": "A data store",
          "enabled": "true",
          "_default": "true",
          "connectionParameters": {
            "entry": [
              {"@key":"host","$":"localhost"},
              {"@key":"port","$":"5432"},
              {"@key":"database","$":"nyc"},
              {"@key":"user","$":"bob"},
              {"@key":"passwd","$":"postgres"},
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | Connection timeout | number of seconds the connection pool will wait before timing out attempting to get a new connection (default, 20 seconds) | user | Integer | False | 20 | | validate connections | check connection is alive before using it | user | Boolean | False | True | | port | Port | user | Integer | True | 5432 | | Primary key metadata table | The optional table containing primary key structure and sequence associations. Can be expressed as 'schema.name' or just 'name' | user | String | False | | | Support on the fly geometry simplification | When enabled, operations such as map rendering will pass a hint that will enable the usage of ST_Simplify | user | Boolean | False | True | | create database | Creates the database if it does not exist yet | advanced | Boolean | False | False | | create database params | Extra specifications appended to the CREATE DATABASE command | advanced | String | False | `` | | dbtype | Type | program | String | True | postgis | | Batch insert size | Number of records inserted in the same batch (default, 1). For optimal performance, set to 100. | user | Integer | False | 1 | | namespace | Namespace prefix | user | String | False | | | Max connection idle time | number of seconds a connection needs to stay idle for the evictor to consider closing it | user | Integer | False | 300 | | Session startup SQL | SQL statement executed when the connection is grabbed from the pool | user | String | False | | | Expose primary keys | Expose primary key columns as attributes of the feature type | user | Boolean | False | False | | min connections | minimum number of pooled connections | user | Integer | False | 1 | | Max open prepared statements | Maximum number of prepared statements kept open and cached for each connection in the pool. Set to 0 to have unbounded caching, to -1 to disable caching | user | Integer | False | 50 | | Callback factory | Name of JDBCReaderCallbackFactory to enable on the data store | user | String | False | | | passwd | password used to login | user | String | False | | | encode functions | set to true to have a set of filter functions be translated directly in SQL. Due to differences in the type systems the result might not be the same as evaluating them in memory, including the SQL failing with errors while the in memory version works fine. However this allows us to push more of the filter into the database, increasing performance of the postgis table. | advanced | Boolean | False | False | | host | Host | user | String | True | localhost | | Evictor tests per run | number of connections checked by the idle connection evictor for each of its runs (defaults to 3) | user | Integer | False | 3 | | Loose bbox | Perform only primary filter on bbox | user | Boolean | False | True | | Evictor run periodicity | number of seconds between idle object evictor runs (default, 300 seconds) | user | Integer | False | 300 | | Estimated extends | Use the spatial index information to quickly get an estimate of the data bounds | user | Boolean | False | True | | database | Database | user | String | False | | | fetch size | number of records read with each interaction with the DBMS | user | Integer | False | 1000 | | Test while idle | Periodically test the connections are still valid also while idle in the pool | user | Boolean | False | True | | max connections | maximum number of open connections | user | Integer | False | 10 | | preparedStatements | Use prepared statements | user | Boolean | False | False | | Session close-up SQL | SQL statement executed when the connection is released to the pool | user | String | False | | | schema | Schema | user | String | False | public | | user | user name to login as | user | String | True | |

  • Shapefile

    Examples:

    • application/xml:

      <dataStore>
        <description>A data store</description>
        <enabled>true</enabled>
        <__default>true</__default>
        <connectionParameters>
          <url>file:/path/to/nyc.shp</url>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "description": "A data store",
          "enabled": "true",
          "_default": "true",
          "connectionParameters": {
            "entry": [
              {"@key":"url","$":"file:/path/to/nyc.shp"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | cache and reuse memory maps | only memory map a file one, then cache and reuse the map | advanced | Boolean | False | True | | namespace | URI to the namespace | advanced | URI | False | | | filetype | Discriminator for directory stores | program | String | False | shapefile | | charset | character used to decode strings from the DBF file | advanced | Charset | False | ISO-8859-1 | | create spatial index | enable/disable the automatic creation of spatial index | advanced | Boolean | False | True | | fstype | Enable using a setting of 'shape'. | advanced | String | False | shape | | url | url to a .shp file | user | URL | True | | | enable spatial index | enable/disable the use of spatial index for local shapefiles | advanced | Boolean | False | True | | memory mapped buffer | enable/disable the use of memory-mapped IO | advanced | Boolean | False | False | | timezone | time zone used to read dates from the DBF file | advanced | TimeZone | False | Pacific Standard Time |

  • Directory of spatial files (shapefiles)

    Examples:

    • application/xml:

      <dataStore>
        <description>A data store</description>
        <enabled>true</enabled>
        <__default>true</__default>
        <connectionParameters>
          <url>file:/path/to/directory</url>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "description": "A data store",
          "enabled": "true",
          "_default": "true",
          "connectionParameters": {
            "entry": [
              {"@key":"url","$":"file:/path/to/directory"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | cache and reuse memory maps | only memory map a file one, then cache and reuse the map | advanced | Boolean | False | True | | namespace | URI to the namespace | advanced | URI | False | | | filetype | Discriminator for directory stores | program | String | False | shapefile | | charset | character used to decode strings from the DBF file | advanced | Charset | False | ISO-8859-1 | | create spatial index | enable/disable the automatic creation of spatial index | advanced | Boolean | False | True | | fstype | Enable using a setting of 'shape'. | advanced | String | False | shape | | url | url to a .shp file | user | URL | True | | | enable spatial index | enable/disable the use of spatial index for local shapefiles | advanced | Boolean | False | True | | memory mapped buffer | enable/disable the use of memory-mapped IO | advanced | Boolean | False | False | | timezone | time zone used to read dates from the DBF file | advanced | TimeZone | False | Pacific Standard Time |

  • Web Feature Service

    Examples:

    • application/xml:

      <dataStore>
        <description>A data store</description>
        <enabled>true</enabled>
        <__default>true</__default>
        <connectionParameters>
          <GET_CAPABILITIES_URL>http://localhost:8080/geoserver/wfs?request=GetCapabilities</GET_CAPABILITIES_URL>
        </connectionParameters>
      </dataStore>
      
    • application/json:

      {
        "dataStore": {
          "description": "A data store",
          "enabled": "true",
          "_default": "true",
          "connectionParameters": {
            "entry": [
              {"@key":"GET_CAPABILITIES_URL","$":"http://localhost:8080/geoserver/wfs?request=GetCapabilities"}
            ]
          }
        }
      }
      

    Connection Parameters:

    | key | description | level | type | required | default | | --- | ----------- | ----- | ---- | -------- | ------- | | Protocol | Sets a preference for the HTTP protocol to use when requesting WFS functionality. Set this value to Boolean.TRUE for POST, Boolean.FALSE for GET or NULL for AUTO | user | Boolean | False | | | WFS GetCapabilities URL | Represents a URL to the getCapabilities document or a server instance. | user | URL | False | | | Buffer Size | This allows the user to specify a buffer size in features. This param has a default value of 10 features. | user | Integer | False | 10 | | Filter compliance | Level of compliance to WFS specification (0-low,1-medium,2-high) | user | Integer | False | | | EntityResolver | Sets the entity resolver used to expand XML entities | program | EntityResolver | False | org.geotools.xml.PreventLocalEntityResolver@75e98519 | | Time-out | This allows the user to specify a timeout in milliseconds. This param has a default value of 3000ms. | user | Integer | False | 3000 | | GmlComplianceLevel | Optional OGC GML compliance level required. | user | Integer | False | 0 | | Lenient | Indicates that datastore should do its best to create features from the provided data even if it does not accurately match the schema. Errors will be logged but the parsing will continue if this is true. Default is false | user | Boolean | False | False | | Password | This allows the user to specify a username. This param should not be used without the USERNAME param. | user | String | False | | | Use Default SRS | Use always the declared DefaultSRS for requests and reproject locally if necessary | advanced | Boolean | False | False | | Namespace | Override the original WFS type name namespaces | advanced | String | False | | | Username | This allows the user to specify a username. This param should not be used without the PASSWORD param. | user | String | False | | | Axis Order Filter | Indicates axis order used by the remote WFS server for filters. It applies only to WFS 1.x.0 servers. Default is the same as AXIS_ORDER | advanced | String | False | | | GmlCompatibleTypeNames | Use Gml Compatible TypeNames (replace : by _). | user | Boolean | False | False | | Maximum features | Positive integer used as a hard limit for the number of Features to retrieve for each FeatureType. A value of zero or not providing this parameter means no limit. | user | Integer | False | 0 | | Axis Order | Indicates axis order used by the remote WFS server in result coordinates. It applies only to WFS 1.x.0 servers. Default is Compliant | advanced | String | False | Compliant | | WFS Strategy | Override WFS strategy with either cubwerx, ionic, mapserver, geoserver, strict, nonstrict or arcgis strategy. | user | String | False | auto | | Try GZIP | Indicates that datastore should use gzip to transfer data if the server supports it. Default is true | user | Boolean | False | True | | Encoding | This allows the user to specify the character encoding of the XML-Requests sent to the Server. Defaults to UTF-8 | user | String | False | UTF-8 | | Outputformat | This allows the user to specify an output format, different from the default one. | advanced | String | False | |

Responses

200

The data store was successfully updated.

Up
put /workspaces/{workspaceName}/datastores
(putdatastores)
Invalid. Use POST for adding a new data store, or PUT on /datastores/{datastore} to edit an existing data store.

Responses

405

Method Not Allowed

Up
post /workspaces/{workspaceName}/appschemastores/{storeName}/rebuildMongoSchemas
Rebuilds all MongoDB internal stores Schemas for an App-Schema store. (rebuildAllMongoSchemas)
Rebuilds all MongoDB internal stores Schemas for an App-Schema store.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data stores.
storeName (required)
Path Parameter — The name of the App-Schema store

Query parameters

ids (optional)
Query Parameter — Comma separated MongoDB object IDs for use in new generated schema.
max (optional)
Query Parameter — Max number of objects for use in new generated schema.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

Up
post /workspaces/{workspaceName}/appschemastores/{storeName}/datastores/{internalStoreId}/rebuildMongoSchemas
Rebuilds a MongoDB internal store Schemas for an App-Schema store. (rebuildMongoSchema)
Rebuilds a MongoDB internal store Schemas for an App-Schema store.

Path parameters

workspaceName (required)
Path Parameter — The name of the workspace containing the data stores.
storeName (required)
Path Parameter — The name of the App-Schema store
internalStoreId (required)
Path Parameter — The store ID for the internal MongoDB store as specified on App-Schema Mappings.

Query parameters

ids (optional)
Query Parameter — Comma separated MongoDB object IDs for use in new generated schema.
max (optional)
Query Parameter — Max number of objects for use in new generated schema.
schema (optional)
Query Parameter — Name of schema to re-build.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

OK

Models

[ Jump to Methods ]

Table of Contents

  1. dataStoreResponse - datastores
  2. datastore - datastore
  3. datastore_1 -
  4. entry -
  5. workspace -

dataStoreResponse - datastores Up

datastore - datastore Up

name (optional)
String Name of data store
description (optional)
String Description of data store
enabled (optional)
Boolean Whether or not the data store is enabled
workspace (optional)
connectionParameters (optional)
__default (optional)
Boolean Whether or not the data store is the default data store
featureTypes (optional)

datastore_1 - Up

name (optional)
String Name of data store
link (optional)
String URL to data store definition

entry - Up

connection parameter key-value pair
key (optional)
String Connection parameter key
value (optional)
String Connection parameter value

workspace - Up

name (optional)
String Name of workspace
link (optional)
String URL to workspace definition