diff --git a/docs/mra-reference.md b/docs/mra-reference.md index f5043e0ba056d66b2c87a9fd84e487dd16205dd4..532ea4d4c922f304933cdd0c4b4ad3bddb0e2a69 100644 --- a/docs/mra-reference.md +++ b/docs/mra-reference.md @@ -7,6 +7,19 @@ Nevertheless, you could refer to the GeoServer Rest API documentation cause MRA You will also find few _docstrings_ by reading the code, especially the module `server.py` which defines the URL mapping infrastructure and HTTP methods used by the REST API. +### Compatibility with GeoServer REST API + +MapServer REST API was designed to offer compatibility with the GeoServer REST API model because we believe that both should be able to communicate... +These two concepts should not be viewed as being mutually opposed. +On the contrary, they can be mutually rewarding. +This was helpful for us. So this can be used more widely. + +The pre-existence of GeoServer REST API obliges us to make choices, and hence depart from the MapServer model in favor of the GeoServer model. +And that does not mean to say that it would be the best way to control MapServer. +However, despite these still substantial differences between the two softwares, + + + ### Workspaces, data stores & featuretypes, coverage stores & coverages A workspace is a grouping of data stores and coverage stores. @@ -21,37 +34,60 @@ A coverage store is a source of spatial data that is raster based. In current version, it can only be a _GeoTIFF_ file. For this format file, the coverage is unique and corresponds to the coverage store. +The concept of _workspace_ comes from GeoServer and it does not exist in MapServer. + +However, it is possible to assimilate this concept to a single _mapfile_. +So a _workspace_ is a _mapfile_. + +###### Workspaces + Resource | Description ---------|------------ [**GET workspaces**](resources/get-workspaces.md) | Returns a list containing workspaces. [**POST workspaces**](resources/post-workspaces.md) | Creates a new workspace. -[**GET workspaces/_ws_**](resources/get-workspace.md) | Returns workspace `_ws_'. -~ | ~ -[**GET workspaces/_ws_/datastores**](resources/get-datastores.md) | Returns a list containing data stores in the workspace `_ws_'. -[**POST workspaces/_ws_/datastores**](resources/post-datastores.md) | Creates a new data store. -[**GET workspaces/_ws_/datastores/_ds_**](resources/get-datastore.md) | Returns data store `_ds_'. -[**PUT workspaces/_ws_/datastores/_ds_**](resources/put-datastore.md) | Modifies data store `_ds_'. -[**DELETE workspaces/_ws_/datastores/_ds_**](resources/delete-datastore.md) | Deletes data store `_ds_'. -[**PUT workspaces/_ws_/datastores/_ds_/file_.extension_**](resources/put-datastore-file.md) | Uploads a vector data file from a local source. -~ | ~ -[**GET workspaces/_ws_/datastores/_ds_/featuretypes**](resources/get-featuretypes.md) | Returns a list containing all feature types in data store `_ds_'. -[**POST workspaces/_ws_/datastores/_ds_/featuretypes**](resources/post-featuretypes.md) | Creates a new feature type. It creates the associated layer by default. -[**GET workspaces/_ws_/datastores/_ds_/featuretypes/_ft_**](resources/get-featuretype.md) | Returns feature type `_ft_'. -[**PUT workspaces/_ws_/datastores/_ds_/featuretypes/_ft_**](resources/put-featuretype.md) | Modifies feature type `_ft_'. -[**DELETE workspaces/_ws_/datastores/_ds_/featuretypes/_ft_**](resources/delete-featuretype.md) | Delete feture type `_ft_'. -~ | ~ -[**GET workspaces/_ws_/coveragestores**](resources/get-coveragestores.md) | Returns a list containing coverage stores in the workspace `_ws_'. -[**POST workspaces/_ws_/coveragetores**](resources/post-coveragestores.md) | Creates a new coverage store. -[**GET workspaces/_ws_/coveragestores/_cs_**](resources/get-coveragestore.md) | Returns coverage store `_cs_'. -[**PUT workspaces/_ws_/coveragestores/_cs_**](resources/put-coveragestore.md) | Modifies coverage store `_cs_'. -[**DELETE workspaces/_ws_/coveragestores/_cs_**](resources/delete-coveragestore.md) | Deletes coverage store `_cs_'. -[**PUT workspaces/_ws_/coveragestores/_cs_/file_.extension_**](resources/put-coveragestore-file.md) | Uploads a raster data file from a local source. -~ | ~ -[**GET workspaces/_<ws>_/coveragestores/_cs_/coverages**](resources/get-coverages.md) | Returns a list containing all coverages in coverage store `_cs_'. -[**POST workspaces/_<ws>_/coveragestores/_cs_/coverages**](resources/post-coverages.md) | Creates a new coverage. It creates the associated layer by default. -[**GET workspaces/_<ws>_/coveragestores/_cs_/coverages/_c_**](resources/get-coverage.md) | Returns coverage `_c_'. -[**PUT workspaces/_<ws>_/coveragestores/_cs_/coverages/_c_**](resources/put-coverage.md) | Modifies coverage `_c_'. -[**DELETE workspaces/_<ws>_/coveragestores/_cs_/coverages/_c_**](resources/delete-coverage.md) | Deletes coverage `_c_'. +[**GET workspaces/\<ws\>**](resources/get-workspace.md) | Returns workspace \<ws\>. + +###### Data Stores + +Resource | Description +---------|------------ +[**GET workspaces/\<ws\>/datastores**](resources/get-datastores.md) | Returns a list containing data stores in the workspace \<ws\>. +[**POST workspaces/\<ws\>/datastores**](resources/post-datastores.md) | Creates a new data store. +[**GET workspaces/\<ws\>/datastores/\<ds\>**](resources/get-datastore.md) | Returns data store \<ds\>. +[**PUT workspaces/\<ws\>/datastores/\<ds\>**](resources/put-datastore.md) | Modifies data store \<ds\>. +[**DELETE workspaces/\<ws\>/datastores/\<ds\>**](resources/delete-datastore.md) | Deletes data store \<ds\>. +[**PUT workspaces/\<ws\>/datastores/\<ds\>/file\<.extension\>**](resources/put-datastore-file.md) | Uploads a vector data file from a local source. + +###### Feature Types + +Resource | Description +---------|------------ +[**GET workspaces/\<ws\>/datastores/\<ds\>/featuretypes**](resources/get-featuretypes.md) | Returns a list containing all feature types in data store \<ds\>. +[**POST workspaces/\<ws\>/datastores/\<ds\>/featuretypes**](resources/post-featuretypes.md) | Creates a new feature type. It creates the associated layer by default. +[**GET workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\>**](resources/get-featuretype.md) | Returns feature type \<ft\>. +[**PUT workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\>**](resources/put-featuretype.md) | Modifies feature type \<ft\>. +[**DELETE workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\>**](resources/delete-featuretype.md) | Delete feture type \<ft\>. + +###### Coverage Stores + +Resource | Description +---------|------------ +[**GET workspaces/\<ws\>/coveragestores**](resources/get-coveragestores.md) | Returns a list containing coverage stores in the workspace \<ws\>. +[**POST workspaces/\<ws\>/coveragetores**](resources/post-coveragestores.md) | Creates a new coverage store. +[**GET workspaces/\<ws\>/coveragestores/\<cs\>**](resources/get-coveragestore.md) | Returns coverage store \<cs\>. +[**PUT workspaces/\<ws\>/coveragestores/\<cs\>**](resources/put-coveragestore.md) | Modifies coverage store \<cs\>. +[**DELETE workspaces/\<ws\>/coveragestores/\<cs\>**](resources/delete-coveragestore.md) | Deletes coverage store \<cs\>. +[**PUT workspaces/\<ws\>/coveragestores/\<cs\>/file\<.extension\>**](resources/put-coveragestore-file.md) | Uploads a raster data file from a local source. + +###### Coverages + +Resource | Description +---------|------------ +[**GET workspaces/\<ws\>/coveragestores/\<cs\>/coverages**](resources/get-coverages.md) | Returns a list containing all coverages in coverage store \<cs\>. +[**POST workspaces/\<ws\>/coveragestores/\<cs\>/coverages**](resources/post-coverages.md) | Creates a new coverage. It creates the associated layer by default. +[**GET workspaces/\<ws\>/coveragestores/\<cs\>/coverages/\<c\>**](resources/get-coverage.md) | Returns coverage \<c\>. +[**PUT workspaces/\<ws\>/coveragestores/\<cs\>/coverages/\<c\>**](resources/put-coverage.md) | Modifies coverage \<c\>. +[**DELETE workspaces/\<ws\>/coveragestores/\<cs\>/coverages/\<c\>**](resources/delete-coverage.md) | Deletes coverage \<c\>. ### Styles @@ -62,9 +98,9 @@ Resource | Description ---------|------------ [**GET styles**](resources/get-styles.md) | Returns a list containing all available styles. [**POST styles**](resources/post-styles.md) | Creates a new style. -[**GET styles/_s_**](resources/get-style.md) | Returns style `_s_'. -[**PUT styles/_s_**](resources/put-style.md) | Modifies style `_s_'. -[**DELETE styles/_s_**](resources/delete-style.md) | Deletes style `_s_'. +[**GET styles/\<s\>**](resources/get-style.md) | Returns style \<s\>. +[**PUT styles/\<s\>**](resources/put-style.md) | Modifies style \<s\>. +[**DELETE styles/\<s\>**](resources/delete-style.md) | Deletes style \<s\>. ### Fonts @@ -86,12 +122,12 @@ Resource | Description ---------|------------ [**GET layers**](resources/get-layers.md) | Returns a list containing all layers. [**POST layers**](resources/post-layers.md) | Creates a new layer. -[**GET layers/_l_**](resources/get-layer.md) | Returns layer `_l_'. -[**PUT layers/_l_**](resources/put-layer.md) | Modifies layer `_l_'. -[**DELETE layers/_l_**](resources/delete-layer.md) | Deletes layer `_l_'. -[**GET layers/_l_/styles**](resources/get-layerstyles.md) | Returns a list containing all styles associated to layer `_l_'. -[**DELETE layers/_l_/styles/_s_**](resources/get-layerstyle.md) | Removes style `_s_' from layer `_l_'. -[**GET layers/_l_/fields**](resources/get-layerfields.md) | Returns a list containing all fields associated to layer `_l_'. +[**GET layers/\<l\>**](resources/get-layer.md) | Returns layer \<l\>. +[**PUT layers/\<l\>**](resources/put-layer.md) | Modifies layer \<l\>. +[**DELETE layers/\<l\>**](resources/delete-layer.md) | Deletes layer \<l\>. +[**GET layers/\<l\>/styles**](resources/get-layerstyles.md) | Returns a list containing all styles associated to layer \<l\>. +[**DELETE layers/\<l\>/styles/\<s\>**](resources/get-layerstyle.md) | Removes style \<s\> from layer \<l\>. +[**GET layers/\<l\>/fields**](resources/get-layerfields.md) | Returns a list containing all fields associated to layer \<l\>. ### Layer groups @@ -102,9 +138,9 @@ Resource | Description ---------|------------ [**GET layergroups**](resources/get-layergroups.md) | Returns a list containing all existing layer groups. [**POST layergroups**](resources/post-layergroups.md) | Creates a new layer group. -[**GET layergroups/_lg_**](resources/get-layergroup.md) | Returns layer group `_lg_'. -[**PUT layergroups/_lg_**](resources/put-layergroup.md) | Modifies layer group `_lg_' (i.e. adding or removing layers of the group). -[**DELETE layergroups/_lg_**](resources/delete-layergroups.md) | Deletes layer group `_lg_'. +[**GET layergroups/\<lg\>**](resources/get-layergroup.md) | Returns layer group \<lg\>. +[**PUT layergroups/\<lg\>**](resources/put-layergroup.md) | Modifies layer group \<lg\> (i.e. adding or removing layers of the group). +[**DELETE layergroups/\<lg\>**](resources/delete-layergroups.md) | Deletes layer group \<lg\>. ### OGC Web Services diff --git a/docs/resources/delete-coverage.md b/docs/resources/delete-coverage.md new file mode 100644 index 0000000000000000000000000000000000000000..6f60c41470696d38814475d800c7794278caf896 --- /dev/null +++ b/docs/resources/delete-coverage.md @@ -0,0 +1,3 @@ +### DELETE workspaces/\<ws\>/coveragestores/\<cs\>/coverages/\<c\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/delete-featuretype.md b/docs/resources/delete-featuretype.md index e9be3b8241d3913eef47151cc75149b08f1795d0..8492690424b92c1d87f4d02c8e0248eb5dd2c37c 100644 --- a/docs/resources/delete-featuretype.md +++ b/docs/resources/delete-featuretype.md @@ -1,19 +1,19 @@ -### DELETE workspaces/{ws}/datastores/{ds}/featuretypes/{ft} +### DELETE workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\> -Removes the configuration of the feature type. +Removes the configuration of the feature type \<ft\>. #### Resource URL -http://hostname/workspaces/{ws}/datastores/{ds}/featuretypes/{ft}{.extension} +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\>\<.format\> #### Available formats JSON, XML. -#### Example request +#### Parameters -**DELETE** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json +None. -#### Response +#### Example request -**Status code:** `200 OK` +`DELETE http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json` \ No newline at end of file diff --git a/docs/resources/delete-layer.md b/docs/resources/delete-layer.md index 053389991341c89ada84682a129279a15bc71f0f..4890068a821b564c330764d8a966f9e02f8902b5 100644 --- a/docs/resources/delete-layer.md +++ b/docs/resources/delete-layer.md @@ -1,19 +1,19 @@ -### DELETE layers/_l_ +### DELETE layers/\<l\> -Deletes the layer `_l_'. +Deletes the layer \<l\>. #### Resource URL -http://_hostname_/layers/_l.format_ +http://\<hostname\>/layers/\<l\>\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Exemple request +#### Parameters -**DELETE** http://hostname/layers/ne_110m_admin_0_countries.json +None. -#### Response +#### Exemple request -**Status code:** `200 OK` +`DELETE http://127.0.0.1/layers/ne_110m_admin_0_countries.json` \ No newline at end of file diff --git a/docs/resources/delete-layergroup.md b/docs/resources/delete-layergroup.md new file mode 100644 index 0000000000000000000000000000000000000000..814f3f5429fd7334995ae2bec7c1b30cf6397e68 --- /dev/null +++ b/docs/resources/delete-layergroup.md @@ -0,0 +1,19 @@ +### DELETE layergroups/\<lg\> + +Deletes the layer group \<lg\>. + +#### Resource URL + +http://\<hostname\>/layergroups/\<lg\>\<.format\> + +#### Available formats + +HTML (default value), JSON, XML. + +#### Parameters + +None. + +#### Exemple request + +`DELETE http://127.0.0.1/layergroups/ne_basemap.xml` \ No newline at end of file diff --git a/docs/resources/delete-style.md b/docs/resources/delete-style.md new file mode 100644 index 0000000000000000000000000000000000000000..2f6a4db4a6bc9909532b653cc0f9e7a83ba181f7 --- /dev/null +++ b/docs/resources/delete-style.md @@ -0,0 +1,3 @@ +### DELETE styles/\<s\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/delete-workspace.md b/docs/resources/delete-workspace.md deleted file mode 100644 index e44f7a711f9a68151a08078c75b073a0d3569a67..0000000000000000000000000000000000000000 --- a/docs/resources/delete-workspace.md +++ /dev/null @@ -1,3 +0,0 @@ -### DELETE workspaces/_ws_ - -`TODO` \ No newline at end of file diff --git a/docs/resources/get-coverage.md b/docs/resources/get-coverage.md new file mode 100644 index 0000000000000000000000000000000000000000..8511166d5828acc24fb7708fc683282ede119a4f --- /dev/null +++ b/docs/resources/get-coverage.md @@ -0,0 +1,3 @@ +### GET workspaces/\<ws\>/coveragestores/\<cs\>/coverages/\<c\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-coverages.md b/docs/resources/get-coverages.md new file mode 100644 index 0000000000000000000000000000000000000000..d948749742cb7c24649f4e36fefbda2196b521ef --- /dev/null +++ b/docs/resources/get-coverages.md @@ -0,0 +1,3 @@ +### GET workspaces/\<ws\>/coveragestores/\<cs\>/coverages + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-coveragestore.md b/docs/resources/get-coveragestore.md new file mode 100644 index 0000000000000000000000000000000000000000..b71d028a072fc6e280817790b9af42e1276f75a4 --- /dev/null +++ b/docs/resources/get-coveragestore.md @@ -0,0 +1,3 @@ +### GET workspaces/\<ws\>/coveragestores/\<cs\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-coveragestores.md b/docs/resources/get-coveragestores.md new file mode 100644 index 0000000000000000000000000000000000000000..01522042f37a38d2017c72ea6648f7d1f14a3504 --- /dev/null +++ b/docs/resources/get-coveragestores.md @@ -0,0 +1,3 @@ +### GET workspaces/\<ws\>/coveragestores + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-datastore.md b/docs/resources/get-datastore.md index e7805b468deddadff5fde438e338870074dba6c5..eb36280926dd57e627e80c479f5ffa76f590daef 100644 --- a/docs/resources/get-datastore.md +++ b/docs/resources/get-datastore.md @@ -1,43 +1,78 @@ -### GET workspaces/_ws_/datastores/_ds_ +### GET workspaces/\<ws\>/datastores/\<ds\> -Returns data store `_ds_'. +Returns data store \<ds\>. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Example request - -**GET** http://hostname/workspaces/my_workspace/datastores/pg_sample.json - -#### Response - -**Status code:** `200 OK` - -```json -{ - "dataStore": { - "name": "pg_sample", - "enabled": true, - "connectionParameters": { - "dbtype": "postgis", - "host": "127.0.0.1", - "port": "5432", - "database": "my_dbname", - "user": "postgres", - "password": "postgres" - }, - "featureTypes": { - "href": "http://hostname/workspaces/my_workspace/datastores/pg_sample/featuretypes.json" - }, - "workspace": { - "href": "http://hostname/workspaces/my_workspace.json", - "name": "my_workspace" - } - } -} -``` \ No newline at end of file +#### Parameters + +None. + +#### Example requests + +##### Data store is a Shapefile connection + +###### XML + +`GET http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries.xml` + +Returns, + +```xml +<dataStore> + <name>ne_110m_admin_0_countries</name> + <enabled>True</enabled> + <workspace> + <name>my_workspace</name> + <atom:link href="http://127.0.0.1/workspaces/my_workspace.xml" rel="alternate" type="application/xml"/> + </workspace> + <connectionParameters> + <entry key="url">file:ne_110m_admin_0_countries.shp</entry> + </connectionParameters> + <featureTypes> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes.xml" rel="alternate" type="application/xml"/> + </featureTypes> +</dataStore> +``` + +##### Data store is a PostGIS connection + +###### XML + +`GET http://127.0.0.1/workspaces/my_workspace/datastores/pg_sample.xml` + +Returns, + +```xml +<dataStore> + <name>pg_sample</name> + <enabled>True</enabled> + <workspace> + <name>my_workspace</name> + <atom:link href="http://127.0.0.1/workspaces/my_workspace.xml" rel="alternate" type="application/xml"/> + </workspace> + <connectionParameters> + <entry key="dbtype">postgis</entry> + <entry key="host">127.0.0.1</entry> + <entry key="port">5432</entry> + <entry key="database">my_dbname</entry> + <entry key="user">postgres</entry> + <entry key="password">postgres</entry> + </connectionParameters> + <featureTypes> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/datastores/pg_sample/featuretypes.xml" rel="alternate" type="application/xml"/> + </featureTypes> +</dataStore> +``` + +#### Compatibility with GeoServer REST API + +The XML response is fully compatible with GeoServer REST API. + +But the JSON response is not. \ No newline at end of file diff --git a/docs/resources/get-datastores.md b/docs/resources/get-datastores.md index 5c3defa140bd0a1911120092ac7cf37d3de94d90..9db34bcdc883dc4c06d3a239d1388ad011ebfe13 100644 --- a/docs/resources/get-datastores.md +++ b/docs/resources/get-datastores.md @@ -1,28 +1,51 @@ -### GET workspaces/_ws_/datastores +### GET workspaces/\<ws\>/datastores -Returns a list containing data stores in workspace `_ws_'. +Returns a list containing data stores in workspace \<ws\>. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores_.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Exemple request +#### Parameters -**GET** http://hostname/workspaces/my_workspace/datastores.json +None. -#### Response +#### Exemple requests -**Status code:** `200 OK` +###### XML + +`GET http://127.0.0.1/workspaces/my_workspace/datastores.xml` + +Returns, + +```xml +<dataStores> + <dataStore> + <name>ne_110m_admin_0_countries</name> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries.xml" rel="alternate" type="application/xml"/> + </dataStore> + <dataStore> + <name>my_second_datastore</name> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/datastores/my_second_datastore.xml" rel="alternate" type="application/xml"/> + </dataStore> +</dataStores> +``` + +###### JSON + +`GET http://127.0.0.1/workspaces/my_workspace/datastores.json` + +Returns, ```json { "dataStores": [ { - "href": "http://hostname/workspaces/my_workspace/datastores/my_fisrt_datastore.json", + "href": "http://hostname/workspaces/my_workspace/datastores/my_first_datastore.json", "name": "my_fisrt_datastore" } { @@ -31,4 +54,27 @@ HTML (default value), JSON, XML. } ] } +``` + +#### Compatibility with GeoServer REST API + +The XML response is fully compatible with GeoServer REST API. + +But the JSON response is not. It should be like below. + +```json +{ + "dataStores": { + "dataStore": [ + { + "href": "http://hostname/workspaces/my_workspace/datastores/my_first_datastore.json", + "name": "my_fisrt_datastore" + } + { + "href": "http://hostname/workspaces/my_workspace/datastores/my_second_datastore.json", + "name": "my_second_datastore" + } + ] + } +} ``` \ No newline at end of file diff --git a/docs/resources/get-featuretype.md b/docs/resources/get-featuretype.md index 3839f88bf437d433245007b33b5ce8af15d04bd2..888087f16acfff062a86b03f9defb725d8e22aa1 100644 --- a/docs/resources/get-featuretype.md +++ b/docs/resources/get-featuretype.md @@ -1,75 +1,75 @@ -### GET workspaces/_ws_/datastores/_ds_/featuretypes/_ft_ +### GET workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\> -Returns the feature type `_ft_'. +Returns the feature type \<ft\>. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds_/featuretypes/_ft.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\>\<.format\> #### Available formats -JSON, XML. +HTML (default value), JSON, XML. + +#### Parameters + +None. #### Example request -**GET** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json +###### XML + +`GET http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.xml` + +Returns, -#### Response +```xml +<featureType> + <name>ne_110m_admin_0_countries</name> + <nativeName>ne_110m_admin_0_countries</nativeName> + <title>ne_110m_admin_0_countries</title> + <nativeCRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</nativeCRS> + <nativeBoundingBox> + <minx>-180.0</minx> + <miny>-90.0</miny> + <maxx>180.0</maxx> + <maxy>83.64513</maxy> + <crs>EPSG:4326</crs> + </nativeBoundingBox> + <latLonBoundingBox> + <minx>-180.0</minx> + <miny>-90.0</miny> + <maxx>180.0</maxx> + <maxy>83.64513</maxy> + <crs>EPSG:4326</crs> + </latLonBoundingBox> + <projectionPolicy>NONE</projectionPolicy> + <enabled>True</enabled> + <store> + <name>ne_110m_admin_0_countries</name> + <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries.xml" rel="alternate" type="application/xml" /> + </store> + <attributes> + <attribute> + <name>scalerank</name> + <type>Integer</type> + <length>4</length> + </attribute> + <attribute> + <name>featurecla</name> + <type>String</type> + <length>30</length> + </attribute> + <!-- (...) --> + <attribute> + <name>geometry</name> + <type>polygon</type> + <minOccurs>0</minOccurs> + <maxOccurs>1</maxOccurs> + </attribute> + </attributes> +</featureType> +``` -**Status code:** `200 OK` +#### Compatibility with GeoServer REST API -```json -{ - "featureType": { - "nativeBoundingBox": { - "minx": -180, - "miny": -90, - "maxx": 180, - "maxy": 83.64513, - "crs": "EPSG:4326" - }, - "nativeCRS": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]", - "latLonBoundingBox": { - "minx": -180, - "miny": -90, - "maxx": 180, - "maxy": 83.64513, - "crs": "EPSG:4326" - }, - "abstract": null, - "nativeName": "ne_110m_admin_0_countries", - "name": "ne_110m_admin_0_countries", - "title": "ne_110m_admin_0_countries", - "enabled": true, - "projectionPolicy": "NONE", - "attributes": [ - { - "length": 4, - "type": "Integer", - "name": "scalerank" - }, - { - "length": 30, - "type": "String", - "name": "featurecla" - }, - { - "length": 16, - "type": "Real", - "name": "labelrank" - }, - // ... - { - "maxOccurs": 1, - "type": "polygon", - "name": "geometry", - "minOccurs": 0 - } - ], - "store": { - "href": "http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries.json", - "name": "ne_110m_admin_0_countries" - } - } -} -``` \ No newline at end of file +`TODO` \ No newline at end of file diff --git a/docs/resources/get-featuretypes.md b/docs/resources/get-featuretypes.md index 5c573b246a44a497ad8a430f7f6baaff86c13e23..1179a85dc4884897eaf54a1e602490cdd276fcac 100644 --- a/docs/resources/get-featuretypes.md +++ b/docs/resources/get-featuretypes.md @@ -1,34 +1,76 @@ -### GET workspaces/_ws_/datastores/_ds_/featuretypes +### GET workspaces/\<ws\>/datastores/\<ds\>/featuretypes -Returns all feature type in data store `_ds_'. +Returns all feature type in data store \<ds\>. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds_/featuretypes_.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>/featuretypes\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Example request +#### Parameters -**GET** http://hostname/workspaces/my_workspace/datastores/my_datastore/featuretypes.json +None. -#### Response +#### Example requests -**Status code:** `200 OK` +###### XML + +`GET http://127.0.0.1/workspaces/my_workspace/datastores/my_datastore/featuretypes.xml` + +Returns, + +```xml +<featureTypes> + <featureType> + <name>ne_110m_admin_0_countries</name> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json" rel="alternate" type="application/xml"/> + </featureType> +</featureTypes> +``` + +###### JSON + +`GET http://127.0.0.1/workspaces/my_workspace/datastores/my_datastore/featuretypes.json` + +Returns, ```json { "featureTypes": [ { "name": "my_first_featuretype", - "href": "http://hostname/workspaces/my_workspace/datastores/my_datastore/featuretypes/my_first_featuretype.json" + "href": "http://127.0.0.1/workspaces/my_workspace/datastores/my_datastore/featuretypes/my_first_featuretype.json" }, { "name": "my_second_featuretype", - "href": "http://hostname/workspaces/my_workspace/datastores/my_datastore/featuretypes/my_second_featuretype.json" + "href": "http://127.0.0.1/workspaces/my_workspace/datastores/my_datastore/featuretypes/my_second_featuretype.json" } ] } +``` + +#### Compatibility with GeoServer REST API + +The XML response is fully compatible with GeoServer REST API. + +But the JSON response is not. It should be like below. + +```json +{ + "featureTypes": { + "featureType": [ + { + "name": "my_first_featuretype", + "href": "http://127.0.0.1/workspaces/my_workspace/datastores/my_datastore/featuretypes/my_first_featuretype.json" + }, + { + "name": "my_second_featuretype", + "href": "http://127.0.0.1/workspaces/my_workspace/datastores/my_datastore/featuretypes/my_second_featuretype.json" + } + ] + } +} ``` \ No newline at end of file diff --git a/docs/resources/get-fonts.md b/docs/resources/get-fonts.md new file mode 100644 index 0000000000000000000000000000000000000000..b5cbfb45351050efeaacdecf0765faeb9b885342 --- /dev/null +++ b/docs/resources/get-fonts.md @@ -0,0 +1,53 @@ +### GET fonts + +Returns the list of available fonts. + +#### Resource URL + +http://\<hostname\>/fonts\<.format\> + +#### Available formats + +HTML (default value), JSON, XML. + +#### Parameters + +None. + +#### Exemple requests + +###### XML + +`GET http://127.0.0.1/fonts.xml` + +Returns, + +```xml +<fonts> + <font>DejaVuSansCondensed</font> + <font>DejaVuSans-BoldOblique</font> + <font>DejaVuSerifCondensed</font> + <font>DejaVuSansMono-Oblique</font> + <font>DejaVuSerifCondensed-BoldItalic</font> + <font>DejaVuSerifCondensed-Bold</font> + <font>DejaVuSans-Bold</font> + <font>DejaVuSans-Oblique</font> + <font>DejaVuSerifCondensed-Italic</font> + <font>DejaVuSansMono-BoldOblique</font> + <font>DejaVuSans</font> + <font>DejaVuSansMono-Bold</font> + <font>DejaVuSansCondensed-Bold</font> + <font>DejaVuSansMono</font> + <font>DejaVuSerif-Bold</font> + <font>DejaVuSansCondensed-Oblique</font> + <font>DejaVuSans-ExtraLight</font> + <font>DejaVuSansCondensed-BoldOblique</font> + <font>DejaVuSerif-Italic</font> + <font>DejaVuSerif-BoldItalic</font> + <font>DejaVuSerif</font> +</fonts> +``` + +#### Compatibility with GeoServer REST API + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-layer.md b/docs/resources/get-layer.md index e7749b3450cfa7b78624b439c22a794db7c4b8c4..2297fdee3df06175e89351a0e0bbb07fda2e54d6 100644 --- a/docs/resources/get-layer.md +++ b/docs/resources/get-layer.md @@ -1,37 +1,69 @@ -### GET layers/_l_ +### GET layers/\<l\> -Returns the layer `_l_'. +Returns the layer \<l\>. #### Resource URL -http://_hostname_/layers/_l.format_ +http://\<hostname\>/layers/\<l\>\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Exemple request +#### Parameters -**GET** http://hostname/layers/ne_110m_admin_0_countries.json +None. -#### Response +#### Exemple requests -**Status code:** `200 OK` +###### XML + +`GET http://127.0.0.1/layers/ne_110m_admin_0_countries.xml` + +Returns, + +```xml +<layer> + <enabled>True</enabled> + <name>ne_110m_admin_0_countries</name> + <title>ne_110m_admin_0_countries</title> + <abstract>ne_110m_admin_0_countries</abstract> + <type>POLYGON</type> + <defaultStyle> + <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="http://127.0.0.1/styles/default_polygon.xml" rel="alternate" type="application/xml" /> + <name>default_polygon</name> + </defaultStyle> + <resource> + <name>ne_110m_admin_0_countries</name> + <atom:link xmlns:atom="http://www.w3.org/2005/Atom" href="http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.xml" rel="alternate" type="application/xml" /> + </resource> +</layer> +``` + +###### JSON + +`GET http://127.0.0.1/layers/ne_110m_admin_0_countries.json` + +Returns, ```json { "layer": { + "enabled": true, "name": "ne_110m_admin_0_countries", + "type": "POLYGON", + "defaultStyle": { + "name": "default_polygon", + "href": "http://127.0.0.1/styles/default_polygon.json" + }, "resource": { "name": "ne_110m_admin_0_countries", - "href": "http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json" - }, - "type": "POLYGON", - "enabled": true - }, - "defaultStyle": { - "href": "http://hostname/styles/default_polygon.json", - "name": "default_polygon" + "href": "http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json" + } } } -``` \ No newline at end of file +``` + +#### Compatibility with GeoServer REST API + +`TODO` diff --git a/docs/resources/get-layergroup.md b/docs/resources/get-layergroup.md new file mode 100644 index 0000000000000000000000000000000000000000..fda7b38d12267db80727b8f47694fbb1708f5d65 --- /dev/null +++ b/docs/resources/get-layergroup.md @@ -0,0 +1,47 @@ +### GET layergroups/\<lg\> + +Returns the layer group \<lg\>. + +#### Resource URL + +http://\<hostname\>/layergroups/\<lg\>\<.format\> + +#### Available formats + +HTML (default value), JSON, XML. + +#### Parameters + +None. + +#### Exemple requests + +###### XML + +`GET http://127.0.0.1/layergroups/ne_basemap.xml` + +Returns, + +```xml +<layerGroup> + <name>ne_basemap</name> + <mode>NAMED</mode> + <publishables> + <published> + <name>countries</name> + <atom:link href="http://192.168.56.181/mra/layers/countries.xml" rel="alternate" type="application/xml"/> + </published> + </publishables> + <bounds> + <minx>-180.0</minx> + <miny>-90.0</miny> + <maxx>180.0</maxx> + <maxy>83.64513</maxy> + <crs>EPSG:4326</crs> + </bounds> +</layerGroup> +``` + +#### Compatibility with GeoServer REST API + +`TODO` diff --git a/docs/resources/get-layergroups.md b/docs/resources/get-layergroups.md new file mode 100644 index 0000000000000000000000000000000000000000..477cf6d0bf6189ff2b0c79f9fb031eb089ca8115 --- /dev/null +++ b/docs/resources/get-layergroups.md @@ -0,0 +1,47 @@ +### GET layergroups + +Returns a list containing all existing layer groups. + +#### Resource URL + +http://\<hostname\>/layergroups\<.format\> + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple requests + +###### XML + +`GET http://127.0.0.1/layergroups.xml` + +Results, + +```xml +<layerGroups> + <layerGroup> + <name>ne_basemap</name> + <atom:link href="http://192.168.56.181/mra/layergroups/ne_basemap.xml" rel="alternate" type="application/xml"/> + </layerGroup> +</layerGroups> +``` + +`GET http://127.0.0.1/layergroups.json` + +Results, + +```xml +{ + "layerGroups": [ + { + "name": "ne_basemap", + "href": "http://192.168.56.181/mra/layergroups/ne_basemap.json" + } + ] +} +``` + +#### Compatibility with GeoServer REST API + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-layers.md b/docs/resources/get-layers.md index 7a62199f2cc95f6c2a84e28ef264bcb5c0671fd4..2fbd638bb118b321189c7088b04bb10d4fa7c286 100644 --- a/docs/resources/get-layers.md +++ b/docs/resources/get-layers.md @@ -4,27 +4,48 @@ Returns a list of all existing layers. #### Resource URL -http://_hostname_/layers_.format_ +http://\<hostname\>/layers\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Exemple request +#### Exemple requests -**GET** http://hostname/layers.json +###### XML -#### Response +`GET http://127.0.0.1/layers.xml` -**Status code:** `200 OK` +Results, + +```xml +<layers> + <layer> + <name>ne_110m_admin_0_countries</name> + <atom:link href="http://127.0.0.1/layers/ne_110m_admin_0_countries.json" rel="alternate" type="application/xml"/> + </layer> +</layers> +``` + +###### JSON + +`GET http://127.0.0.1/layers.json` + +Results, ```json { "layers": [ { "name": "ne_110m_admin_0_countries", - "href": "http://hostname/layers/ne_110m_admin_0_countries.json" + "href": "http://127.0.0.1/layers/ne_110m_admin_0_countries.json" } ] } -``` \ No newline at end of file +``` + +#### Compatibility with GeoServer REST API + +The XML response is fully compatible with GeoServer REST API. + +But the JSON response is not. \ No newline at end of file diff --git a/docs/resources/get-ogc-settings.md b/docs/resources/get-ogc-settings.md new file mode 100644 index 0000000000000000000000000000000000000000..a5ac8e1cd28a271c30624d053db1857569009fbd --- /dev/null +++ b/docs/resources/get-ogc-settings.md @@ -0,0 +1,3 @@ +### GET service/[wms,wfs,wcs]/setting + +`TODO \ No newline at end of file diff --git a/docs/resources/get-style.md b/docs/resources/get-style.md new file mode 100644 index 0000000000000000000000000000000000000000..0967128c56f3fe66459c49a5a039b7d9c84f57e7 --- /dev/null +++ b/docs/resources/get-style.md @@ -0,0 +1,73 @@ +### GET styles/\<s\> + +Returns style \<s\>. + +#### Resource URL + +http://\<hostname\>/styles/\<s\>\<.format\> + +#### Available formats + +HTML (default value), JSON, XML, [SLD](http://www.opengeospatial.org/standards/sld). + +#### Parameters + +None. + +#### Exemple requests + +###### XML + +`GET http://127.0.0.1/styles/countries_style.xml` + +Returns, + +```xml +<style> + <name>countries_style</name> + <filename>countries_style.sld</filename> + <sldVersion> + <version>1.0.0</version> + </sldVersion> +</style> +``` + +###### SLD + +`GET http://127.0.0.1/styles/countries_style.sld` + +Returns, + +```xml +<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" + xmlns:ogc="http://www.opengis.net/ogc" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" + xmlns:xlink="http://www.w3.org/1999/xlink" + xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" + xmlns:se="http://www.opengis.net/se"> + <NamedLayer> + <se:Name>countries_style</se:Name> + <UserStyle> + <se:Name>countries_style</se:Name> + <se:FeatureTypeStyle> + <se:Rule> + <se:Name>Single symbol</se:Name> + <se:PolygonSymbolizer> + <se:Fill> + <se:SvgParameter name="fill">#fff5e0</se:SvgParameter> + </se:Fill> + <se:Stroke> + <se:SvgParameter name="stroke">#4b4044</se:SvgParameter> + <se:SvgParameter name="stroke-width">0.4</se:SvgParameter> + </se:Stroke> + </se:PolygonSymbolizer> + </se:Rule> + </se:FeatureTypeStyle> + </UserStyle> + </NamedLayer> +</StyledLayerDescriptor> +``` + +#### Compatibility with GeoServer REST API + +`TODO` diff --git a/docs/resources/get-styles.md b/docs/resources/get-styles.md new file mode 100644 index 0000000000000000000000000000000000000000..ca86cd4387908db4ac069771f6bdc52f4a2a9f80 --- /dev/null +++ b/docs/resources/get-styles.md @@ -0,0 +1,44 @@ +### GET styles + +Returns a list containing all available styles. + +#### Resource URL + +http://\<hostname\>/styles\<.format\> + +#### Available formats + +HTML (default value), JSON, XML. + +#### Parameters + +None. + +#### Exemple requests + +###### XML + +`GET http://127.0.0.1/styles.xml` + +Returns, + +```xml +<styles> + <style> + <name>default_point</name> + <atom:link href="http://127.0.0.1/styles/default_point.xml" rel="alternate" type="application/xml" /> + </style> + <style> + <name>default_line</name> + <atom:link href="http://127.0.0.1/styles/default_line.xml" rel="alternate" type="application/xml" /> + </style> + <style> + <name>default_polygon</name> + <atom:link href="http://127.0.0.1/styles/default_polygon.xml" rel="alternate" type="application/xml" /> + </style> +</styles> +``` + +#### Compatibility with GeoServer REST API + +`TODO` diff --git a/docs/resources/get-workspace.md b/docs/resources/get-workspace.md index ea711d0456a7ae067b172dfaf3402aa026b03dec..4f663f7b53d139e3e5deb32960b5debc68229017 100644 --- a/docs/resources/get-workspace.md +++ b/docs/resources/get-workspace.md @@ -1,33 +1,76 @@ -### GET workspaces/_ws_ +### GET workspaces/\<ws\> -Returns workspace `_ws_'. +Returns workspace \<ws\>. #### Resource URL -http://_hostname_/workspaces/_ws.format_ +http://\<hostname\>/workspaces/\<ws\>\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Example request +#### Parameters -**GET** http://hostname/workspaces/my_workspace.json +None. -##### Response +#### Example requests -**Status code:** `200 OK` +###### JSON + +`GET http://127.0.0.1/workspaces/my_workspace.json` + +Returns + +Status code: `200 OK` ```json { "workspace": { "name": "my_workspace", "dataStores": { - "href": "http://hostname/workspaces/my_workspace/datastores.json" + "href": "http://127.0.0.1/workspaces/my_workspace/datastores.json" }, "coverageStores": { - "href": "http://hostname/workspaces/my_workspace/coveragestores.json" + "href": "http://127.0.0.1/workspaces/my_workspace/coveragestores.json" } } } +``` + +###### XML + +`GET http://127.0.0.1/workspaces/my_workspace.xml` + +Returns, + +Status code: `200 OK` + +```xml +<workspace> + <name>my_workspace</name> + <dataStores> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/datastores.xml" rel="alternate" type="application/xml"/> + </dataStores> + <coverageStores> + <atom:link href="http://127.0.0.1/workspaces/my_workspace/coveragestores.xml" rel="alternate" type="application/xml"/> + </coverageStores> +</workspace> +``` + +#### Compatibility with GeoServer REST API + +The XML response is fully compatible with GeoServer REST API. + +But the JSON response is not. +It should be like below. + +```json +{ + "workspace": { + "name": "my_workspace", + "dataStores": "http://127.0.0.1/workspaces/my_workspace/datastores.json", + "coverageStores": "http://127.0.0.1/workspaces/my_workspace/coveragestores.json" + } +} ``` \ No newline at end of file diff --git a/docs/resources/get-workspaces.md b/docs/resources/get-workspaces.md index 4813b1c7695a537d411befa685d520e1ba1bcfec..57a7effece36f4b8bd0a52af3481276753a61dec 100644 --- a/docs/resources/get-workspaces.md +++ b/docs/resources/get-workspaces.md @@ -4,27 +4,66 @@ Returns a list containing all workspaces. #### Resource URL -http://_hostname_/workspaces_.format_ +http://\<hostname\>/workspaces\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Example request +#### Parameters -**GET** http://hostname/workspaces.json +None. -##### Response +#### Example requests -**Status code:** `200 OK` +###### XML + +`GET http://127.0.0.1/workspaces.xml` + +Returns, + +```xml +<workspaces> + <workspace> + <name>my_workspace</name> + <atom:link href="http://127.0.0.1/workspaces/my_workspace.xml" rel="alternate" type="application/xml"/> + </workspace> +</workspaces> +``` + +###### JSON + +`GET http://127.0.0.1/workspaces.json` + +Returns, ```json { "workspaces": [ { - "href": "http://hostname/workspaces/my_workspace.json", - "name": "sample" + "name": "my_workspace", + "href": "http://127.0.0.1/workspaces/my_workspace.json" } ] } +``` + +#### Compatibility with GeoServer REST API + +The XML response is fully compatible with GeoServer REST API. + +But the JSON response is not. +It should be like above. + +```json +{ + "workspaces": { + "workspace": [ + { + "name": "my_workspace", + "href": "http://127.0.0.1/workspaces/my_workspace.json" + } + ] + } +} ``` \ No newline at end of file diff --git a/docs/resources/post-coverages.md b/docs/resources/post-coverages.md new file mode 100644 index 0000000000000000000000000000000000000000..5621274de749648515f382a0d36b0730775354a2 --- /dev/null +++ b/docs/resources/post-coverages.md @@ -0,0 +1,3 @@ +### POST workspaces/\<ws\>/coveragestores/\<cs\>/coverages + +`TODO` \ No newline at end of file diff --git a/docs/resources/post-coveragestores.md b/docs/resources/post-coveragestores.md new file mode 100644 index 0000000000000000000000000000000000000000..c6a0748721fcd767e8f5f4de94e6ff8ab1ee154c --- /dev/null +++ b/docs/resources/post-coveragestores.md @@ -0,0 +1,3 @@ +### POST workspaces/\<ws\>/coveragestores + +`TODO` \ No newline at end of file diff --git a/docs/resources/post-datastores.md b/docs/resources/post-datastores.md index c0fb5ac3d7eb5e522b14fdc2b85f043f6b477a25..ce695d2804ce9626df4150fc9a0273f768c03542 100644 --- a/docs/resources/post-datastores.md +++ b/docs/resources/post-datastores.md @@ -1,22 +1,30 @@ -### POST workspaces/_ws_/datastores +### POST workspaces/\<ws\>/datastores -Creates a new data store in workspace `_ws_'. +Creates a new data store in workspace \<ws\>. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>\<.format\> #### Available formats JSON, XML. -#### Example request +#### Parameters -**POST** http://hostname/workspaces/my_workspace/datastores.json +None. -**POST Content-type:** `application-json` +#### Example requests -**POST data:** +##### Data store is a PostGIS connection + +###### JSON + +`POST http://127.0.0.1/workspaces/my_workspace/datastores.json` + +Content-type: `application/json` + +Data: ```json { @@ -35,8 +43,12 @@ JSON, XML. } ``` -#### Response +Returns, + +Status code: `201 Created` + +Location: `http://127.0.0.1/workspaces/my_workspace/datastores/pg_sample.json` -**Status code:** `201 Created` +#### Compatibility with GeoServer REST API -**Location:** `http://hostname/workspaces/my_workspace/datastores/pg_sample.json` +`TODO` \ No newline at end of file diff --git a/docs/resources/post-featuretypes.md b/docs/resources/post-featuretypes.md index edb3aa4ad8750a1c0e6d0ab47c57a72214fdbfa9..95dd7c7cc02b9a941ecd92ae0656a39bd8b9a143 100644 --- a/docs/resources/post-featuretypes.md +++ b/docs/resources/post-featuretypes.md @@ -1,25 +1,29 @@ -### POST workspaces/_ws_/datastores/_ds_/featuretypes +### POST workspaces/\<ws\>/datastores/\<ds\>/featuretypes -Configures a new feature type in data store `_ds_'. +Configures a new feature type in data store \<ds\>. The feature type musts exit. This operation creates automatically the associated [layer](../mra-reference.md#layers). #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds_/featuretypes_.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>/featuretypes\<.format\> #### Available formats JSON, XML. -#### Example request +#### Parameters -**POST** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes.json +None. -**POST Content-type:** `application-json` +#### Example requests -**POST data:** +`POST http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes.json` + +Content-type: `application/json` + +Data: ```json { @@ -30,8 +34,12 @@ JSON, XML. } ``` -#### Response +Returns, + +Status code: `201 Created` + +Location: `http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json` -**Status code:** `201 Created` +#### Compatibility with GeoServer REST API -**Location:** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json +`TODO` \ No newline at end of file diff --git a/docs/resources/post-layergrpus.md b/docs/resources/post-layergrpus.md new file mode 100644 index 0000000000000000000000000000000000000000..cd564d39de1392709ea8732e76a6b9fd0402a183 --- /dev/null +++ b/docs/resources/post-layergrpus.md @@ -0,0 +1,45 @@ +### POST layergroups + +Creates a new layer group. + +#### Resource URL + +http://\<hostname\>/layergroups\<.format\> + +#### Available formats + +HTML (default value), JSON, XML. + +#### Parameters + +None. + +#### Exemple requests + +###### XML + +`POST http://127.0.0.1/layergroups.xml` + +Content-type: `application/xml` + +Data: + +```xml +<layerGroup> + <name>ne_basemap</name> + <layers> + <layer>countries</layer> + <layer>populated_places</layer> + </layers> +</layerGroup> +``` + +Returns, + +Status code: `201 Created` + +Location: `http://127.0.0.1/layergroups/ne_basemap.xml + +#### Compatibility with GeoServer REST API + +`TODO` \ No newline at end of file diff --git a/docs/resources/post-layers.md b/docs/resources/post-layers.md index e5bbd6e53ca2e974a2118db11f6fe709f45adde3..95c10b372594d563a64ba6cc363b5956791300f2 100644 --- a/docs/resources/post-layers.md +++ b/docs/resources/post-layers.md @@ -4,32 +4,42 @@ Creates a new layers. #### Resource URL -http://_hostname_/layers_.format_ +http://\<hostname\>/layers\<.format\> #### Available formats HTML (default value), JSON, XML. -#### Exemple request +#### Parameters -**POST** http://hostname/layers.json +None. -**POST Content-type:** `application-json` +#### Exemple requests -**POST data:** +###### JSON + +`POST http://127.0.0.1/layers.json` + +Content-type: `application/json` + +Data: ```json { "layer": { "name": "ne_110m_admin_0_countries", "resource": { - "href": "http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json"} + "href": "http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json"} } } ``` -#### Response +Returns, + +Status code: `201 Created` + +Location: `http://127.0.0.1/layer/ne_110m_admin_0_countries.json -**Status code:** `201 Created` +#### Compatibility with GeoServer REST API -**Location:** http://hostname/layer/just_countries.json +`TODO` \ No newline at end of file diff --git a/docs/resources/post-styles.md b/docs/resources/post-styles.md new file mode 100644 index 0000000000000000000000000000000000000000..a6df442389170d6ce8e6583e1a6b9f4da81ed604 --- /dev/null +++ b/docs/resources/post-styles.md @@ -0,0 +1,65 @@ +### POST styles + +Creates a new style. + +#### Resource URL + +http://\<hostname\>/styles\<.format\> + +#### Available formats + +[SLD](http://www.opengeospatial.org/standards/sld). + +#### Parameters + +Parameter | Description +----------|------------ +**name** _(mandatory)_ | To specify the name to be given to the new style. + +#### Exemple requests + +###### SLD + +`GET http://127.0.0.1/styles.sld?name=countries_style` + +Content-Type: `application/vnd.ogc.sld+xml` + +```xml +<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" + xmlns:ogc="http://www.opengis.net/ogc" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" + xmlns:xlink="http://www.w3.org/1999/xlink" + xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" + xmlns:se="http://www.opengis.net/se"> + <NamedLayer> + <se:Name>countries_style</se:Name> + <UserStyle> + <se:Name>countries_style</se:Name> + <se:FeatureTypeStyle> + <se:Rule> + <se:Name>Single symbol</se:Name> + <se:PolygonSymbolizer> + <se:Fill> + <se:SvgParameter name="fill">#fff5e0</se:SvgParameter> + </se:Fill> + <se:Stroke> + <se:SvgParameter name="stroke">#4b4044</se:SvgParameter> + <se:SvgParameter name="stroke-width">0.4</se:SvgParameter> + </se:Stroke> + </se:PolygonSymbolizer> + </se:Rule> + </se:FeatureTypeStyle> + </UserStyle> + </NamedLayer> +</StyledLayerDescriptor> +``` + +Returns, + +Status message: `201 Created` + +Location: `http://127.0.0.1/styles/countries_style.sld` + +#### Compatibility with GeoServer REST API + +`TODO` diff --git a/docs/resources/post-workspaces.md b/docs/resources/post-workspaces.md index ae7d3eee4a18a6b7513ad2a0e3b4878fd39960ff..f8db2cb245e5f9cd204ed9dd4631e4f959138a8e 100644 --- a/docs/resources/post-workspaces.md +++ b/docs/resources/post-workspaces.md @@ -4,19 +4,25 @@ Creates a new workspace. #### Resource URL -http://_hostname_/workspaces_.format_ +http://\<hostname\>/workspaces\<.format\> #### Available formats JSON, XML. -#### Example request +#### Parameters -**POST** http://hostname/workspaces.json +None. -**POST Content-type:** `application-json` +#### Example requests -**POST data:** +###### JSON + +`POST http://127.0.0.1/workspaces.json` + +Content-type: `application/json` + +Data: ```json { @@ -27,8 +33,26 @@ JSON, XML. } ``` -##### Response +###### XML + +`POST http://127.0.0.1/workspaces.xml` + +Content-type: `application/xml` + +Data: + +```xml +<workspace> + <name>another_workspace</name> +</workspace> +``` + +Returns, + +Status code: `201 Created` + +With Location: `http://hostname/workspaces/another_workspace.xml` -**Status code:** `201 OK` +#### Compatibility with GeoServer REST API -**Location:** `http://hostname/workspaces/my_workspace.json` \ No newline at end of file +Fully compatible. \ No newline at end of file diff --git a/docs/resources/put-coverage.md b/docs/resources/put-coverage.md new file mode 100644 index 0000000000000000000000000000000000000000..c8615690e9ea9a2e94ce79ccb88b7764bba5663c --- /dev/null +++ b/docs/resources/put-coverage.md @@ -0,0 +1,3 @@ +### PUT workspaces/\<ws\>/coveragestores/\<cs\>/coverages/\<c\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-coveragestore-file.md b/docs/resources/put-coveragestore-file.md new file mode 100644 index 0000000000000000000000000000000000000000..b7c6bab62e51facebf0c6485d9c1cfccdb6dc855 --- /dev/null +++ b/docs/resources/put-coveragestore-file.md @@ -0,0 +1,3 @@ +### PUT workspaces/\<ws\>/coveragestores/\<cs\>/file\<.extension\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-coveragestore.md b/docs/resources/put-coveragestore.md new file mode 100644 index 0000000000000000000000000000000000000000..c3895b44500ed9676e83483661d2279166b0166c --- /dev/null +++ b/docs/resources/put-coveragestore.md @@ -0,0 +1,3 @@ +### PUT workspaces/\<ws\>/coveragestores/\<cs\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-datastore-file.md b/docs/resources/put-datastore-file.md index aeb6a729f1de6bceecd4ebe86a6de680f0bd8e25..342befa08eefd3358fda96802b0d9d0a6d90b3a5 100644 --- a/docs/resources/put-datastore-file.md +++ b/docs/resources/put-datastore-file.md @@ -1,11 +1,11 @@ -### PUT workspaces/_ws_/datastores/_ds_/file_.extension_ +### PUT workspaces/\<ws\>/datastores/\<ds\>/file\<.extension\> -Uploads a file from a local source and creates the data store `_ds_'. -File must be zipped. +Uploads a file from a local source and creates the data store \<ds\>. +Files must be zipped. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds_/file_.extension_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>/file\<.extension\> #### Available extensions @@ -13,16 +13,20 @@ SHP (ShapeFile). #### Parameters -`TODO` +None. #### Example request -**PUT** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/file.shp +`PUT http://127.0.0.1/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/file.shp` -**PUT Content-type:** `application-zip` +Content-type: `application/zip` -**PUT binary-data** +Data: `binary-data` -#### Response +Returns -**Status code:** `200 OK` +Status code: `200 OK` + +#### Compatibility with GeoServer REST API + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-datastore.md b/docs/resources/put-datastore.md index 2ff343a32bdc7867af6a96c32d1ed709240ba5f5..823b0ae60cde157e8b6527740d2eab5fbd25ed54 100644 --- a/docs/resources/put-datastore.md +++ b/docs/resources/put-datastore.md @@ -1,28 +1,36 @@ -### PUT workspaces/_ws_/datastores/_ds_ +### PUT workspaces/\<ws\>/datastores/\<ds\> -Modifies data store `_ds_'. +Modifies data store \<ds\>. #### Resource URL -http://_hostname_/workspaces/_ws_/datastores/_ds.format_ +http://\<hostname\>/workspaces/\<ws\>/datastores/\<ds\>\<.format\> #### Available formats JSON, XML. +#### Parameters + +None. + #### Example request -**PUT http://hostname/workspaces/my_workspace/datastores/pg_sample.json +##### Data store is a PostGIS connection + +###### JSON -**PUT Content-type:** `application-json` +`PUT http://127.0.0.1/workspaces/my_workspace/datastores/pg_sample.json` -**PUT Data:** +Content-type: `application/json` + +Data: ```json { "dataStore": { "name": "pg_sample", - "enabled": false, + "enabled": true, "connectionParameters": { "dbtype": "postgis", "host": "127.0.0.1", @@ -35,8 +43,6 @@ JSON, XML. } ``` -#### Response - -**Status code:** `201 Created` +#### Compatibility with GeoServer REST API -**Location:** `http://hostname/workspaces/my_workspace/datastores/pg_sample.json` +`TODO` \ No newline at end of file diff --git a/docs/resources/put-featuretype.md b/docs/resources/put-featuretype.md index 62d1fe97a8bda1ea4f8250568a62d8219f84b8db..58e4a99b36d76c0921a1797580d358d4b16be6b6 100644 --- a/docs/resources/put-featuretype.md +++ b/docs/resources/put-featuretype.md @@ -1,3 +1,3 @@ -### PUT workspaces/_ws_/datastores/_ds_/featuretypes/_ft_ +### PUT workspaces/\<ws\>/datastores/\<ds\>/featuretypes/\<ft\> -`TODO` +`TODO` \ No newline at end of file diff --git a/docs/resources/put-fonts.md b/docs/resources/put-fonts.md new file mode 100644 index 0000000000000000000000000000000000000000..ce57849e9495377c674c714fda948760986e0e8e --- /dev/null +++ b/docs/resources/put-fonts.md @@ -0,0 +1,34 @@ +### PUT fonts + +Uploads fonts from a local source. +Files must be zipped. + +#### Resource URL + +http://\<hostname\>/fonts\<.format\> + +#### Available formats + +TTF (TrueType). + +#### Parameters + +None. + +#### Exemple requests + +###### + +`PUT http://127.0.0.1/fonts.tff` + +Content-type: `application/zip` + +Data: `binary-data` + +Returns + +Status code: `200 OK` + +#### Compatibility with GeoServer REST API + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-layer.md b/docs/resources/put-layer.md index 6ea5b30553a25ce277d97bc37992532c687a731d..0e9640e9bbaae2f5eabf553b98d741348062263f 100644 --- a/docs/resources/put-layer.md +++ b/docs/resources/put-layer.md @@ -1,22 +1,28 @@ -### PUT layers/_l_ +### PUT layers/\<l\> -Modifies the configuration of the layer `_l_'. +Modifies the configuration of the layer \<l\>. #### Resource URL -http://_hostname_/layers/_l.format_ +http://\<hostname\>/layers/\<l\>\<.format\> #### Available formats -HTML (default value), JSON, XML. +JSON, XML. -#### Exemple request +#### Parameters -**PUT** http://hostname/layers/ne_110m_admin_0_countries.json +None. -**PUT Content-type:** `application-json` +#### Exemple requests -**PUT data:** +###### JSON + +`PUT http://127.0.0.1/layers/ne_110m_admin_0_countries.json` + +Content-type: `application/json` + +Data: ```json { @@ -27,6 +33,6 @@ HTML (default value), JSON, XML. } ``` -#### Response +#### Compatibility with GeoServer REST API -**Status code:** `200 OK` +`TODO` \ No newline at end of file diff --git a/docs/resources/put-layergroup.md b/docs/resources/put-layergroup.md new file mode 100644 index 0000000000000000000000000000000000000000..261595f5b07c9497578d48eb70876ce5b99c9f43 --- /dev/null +++ b/docs/resources/put-layergroup.md @@ -0,0 +1,40 @@ +### PUT layergroups/\<lg\> + +Modifies layer group \<lg\> i.e. adding or removing layers of the group. + +#### Resource URL + +http://\<hostname\>/layergroups/\<lg\>\<.format\> + +#### Available formats + +JSON, XML. + +#### Parameters + +None. + +#### Exemple requests + +###### JSON + +`PUT http://127.0.0.1/layergroups/ne_basemap.xml` + +Content-type: `application/xml` + +Data: + +```xml +<layerGroup> + <name>ne_basemap</name> + <layers> + <layer>countries</layer> + <layer>rivers</layer> + <layer>populated_places</layer> + </layers> +</layerGroup> +``` + +#### Compatibility with GeoServer REST API + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-ogc-settings.md b/docs/resources/put-ogc-settings.md new file mode 100644 index 0000000000000000000000000000000000000000..6e2015040a23d8e911709e3faebe2d02d9e68610 --- /dev/null +++ b/docs/resources/put-ogc-settings.md @@ -0,0 +1,3 @@ +### PUT service/[wms,wfs,wcs]/setting + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-style.md b/docs/resources/put-style.md new file mode 100644 index 0000000000000000000000000000000000000000..c33f9e298ad04660147bafde9b153dc394e6660c --- /dev/null +++ b/docs/resources/put-style.md @@ -0,0 +1,3 @@ +### PUT styles/\<s\> + +`TODO` \ No newline at end of file diff --git a/docs/resources/put-workspace.md b/docs/resources/put-workspace.md index d3be5eabaef1a1124f3544ced8dff2994eb2e2d3..d52a5094a6c1049dc8d2011f30ba73b6dc6031e4 100644 --- a/docs/resources/put-workspace.md +++ b/docs/resources/put-workspace.md @@ -1,3 +1,3 @@ -### PUT workspaces/_ws_ +### PUT workspaces/\<ws\> `TODO` \ No newline at end of file