From 10143de5249a9255be3a12655acd82d1a6914fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20M=C3=A9liani?= <m.meliani@neogeo-online.net> Date: Mon, 7 Apr 2014 11:30:35 +0200 Subject: [PATCH] Updated docs... --- docs/mra-reference.md | 124 ++++----- docs/pages/coveragestores.md | 1 - docs/pages/datastores.md | 380 --------------------------- docs/pages/fonts.md | 1 - docs/pages/layergroups.md | 1 - docs/pages/layers.md | 157 ----------- docs/pages/ogc-web-service.md | 1 - docs/pages/styles.md | 1 - docs/pages/workspaces.md | 97 ------- docs/resources/delete-featuretype.md | 19 ++ docs/resources/delete-layer.md | 19 ++ docs/resources/delete-workspace.md | 3 + docs/resources/get-datastore.md | 43 +++ docs/resources/get-datastores.md | 34 +++ docs/resources/get-featuretype.md | 75 ++++++ docs/resources/get-featuretypes.md | 34 +++ docs/resources/get-layer.md | 37 +++ docs/resources/get-layers.md | 30 +++ docs/resources/get-workspace.md | 33 +++ docs/resources/get-workspaces.md | 30 +++ docs/resources/post-datastores.md | 42 +++ docs/resources/post-featuretypes.md | 37 +++ docs/resources/post-layers.md | 35 +++ docs/resources/post-workspaces.md | 34 +++ docs/resources/put-datastore-file.md | 28 ++ docs/resources/put-datastore.md | 42 +++ docs/resources/put-featuretype.md | 3 + docs/resources/put-layer.md | 32 +++ docs/resources/put-workspace.md | 3 + 29 files changed, 678 insertions(+), 698 deletions(-) delete mode 100644 docs/pages/coveragestores.md delete mode 100644 docs/pages/datastores.md delete mode 100644 docs/pages/fonts.md delete mode 100644 docs/pages/layergroups.md delete mode 100644 docs/pages/layers.md delete mode 100644 docs/pages/ogc-web-service.md delete mode 100644 docs/pages/styles.md delete mode 100644 docs/pages/workspaces.md create mode 100644 docs/resources/delete-featuretype.md create mode 100644 docs/resources/delete-layer.md create mode 100644 docs/resources/delete-workspace.md create mode 100644 docs/resources/get-datastore.md create mode 100644 docs/resources/get-datastores.md create mode 100644 docs/resources/get-featuretype.md create mode 100644 docs/resources/get-featuretypes.md create mode 100644 docs/resources/get-layer.md create mode 100644 docs/resources/get-layers.md create mode 100644 docs/resources/get-workspace.md create mode 100644 docs/resources/get-workspaces.md create mode 100644 docs/resources/post-datastores.md create mode 100644 docs/resources/post-featuretypes.md create mode 100644 docs/resources/post-layers.md create mode 100644 docs/resources/post-workspaces.md create mode 100644 docs/resources/put-datastore-file.md create mode 100644 docs/resources/put-datastore.md create mode 100644 docs/resources/put-featuretype.md create mode 100644 docs/resources/put-layer.md create mode 100644 docs/resources/put-workspace.md diff --git a/docs/mra-reference.md b/docs/mra-reference.md index bef8b89..f5043e0 100644 --- a/docs/mra-reference.md +++ b/docs/mra-reference.md @@ -6,7 +6,8 @@ It is in process of writing... Nevertheless, you could refer to the GeoServer Rest API documentation cause MRA was designed to offer compatibility with this model. 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. -### Workspaces + +### Workspaces, data stores & featuretypes, coverage stores & coverages A workspace is a grouping of data stores and coverage stores. @@ -22,90 +23,95 @@ For this format file, the coverage is unique and corresponds to the coverage sto Resource | Description ---------|------------ -[**GET workspaces**](pages/workspaces.md#get-workspaces) | Returns a list containing workspaces. -[**POST workspaces**](pages/workspaces.md#post-workspaces) | Creates a new workspace. -[**GET workspaces/_{ws}_**](pages/workspaces.md#get-workspacesws) | Returns the given workspace. -[**GET workspaces/_{ws}_/datastores**](pages/datastores.md#get-workspaceswsdatastores) | Returns a list containing data stores in the given workspace. -[**POST workspaces/_{ws}_/datastores**](pages/datastores.md#post-workspaceswsdatastores) | Creates a new data store. -[**GET workspaces/_{ws}_/datastores/_{ds}_**](pages/datastores.md#get-workspaceswsdatastoresds) | Returns data store _{ds}_. -[**PUT workspaces/_{ws}_/datastores/_{ds}_**](pages/datastores.md#put-workspaceswsdatastoresds) | Modifies data store _{ds}_. -[**DELETE workspaces/_{ws}_/datastores/_{ds}_**](pages/datastores.md#delete-workspaceswsdatastoresds) | Deletes data store _{ds}_. -[**PUT workspaces/_{ws}_/datastores/_{ds}_/file._{extension}_**](pages/datastores.md#put-workspaceswsdatastoresdsfileextension) | Uploads a vector data file from a local source. -**GET workspaces/_{ws}_/datastores/_{ds}_/featuretypes** | Returns a list containing all feature types in selected data store. -**POST workspaces/_{ws}_/datastores/_{ds}_/featuretypes** | Creates a new feature type. It creates the associated layer by default. -**GET workspaces/_{ws}_/datastores/_{ds}_/featuretypes/_{ft}_** | Returns feature type _{ft}_. -**PUT workspaces/_{ws}_/datastores/_{ds}_/featuretypes/_{ft}_** | Modifies feature type _{ft}_. -**DELETE workspaces/_{ws}_/datastores/_{ds}_/featuretypes/_{ft}_** | Delete feture type _{ft}_. -**GET workspaces/_{ws}_/coveragestores** | Returns a list containing coverage stores in the given workspace. -**POST workspaces/_{ws}_/coveragetores** | Creates a new coverage store. -**GET workspaces/_{ws}_/coveragestores/_{cs}_** | Returns coverage store _{cs}_. -**PUT workspaces/_{ws}_/coveragestores/_{cs}_** | Modifies coverage store _{ds}_. -**DELETE workspaces/_{ws}_/coveragestores/_{cs}_** | Deletes coverage store _{ds}_. -**PUT workspaces/_{ws}_/coveragestores/_{cs}_/file._{extension}_** | Uploads a raster data file from a local source. -**GET workspaces/_{ws}_/coveragestores/_{cs}_/coverages** | Returns a list containing all coverages in selected coverage store. -**POST workspaces/_{ws}_/coveragestores/_{cs}_/coverages** | Creates a new coverage. It creates the associated layer by default. -**GET workspaces/_{ws}_/coveragestores/_{cs}_/coverages/_{c}_** | Returns coverage _{c}_. -**PUT workspaces/_{ws}_/coveragestores/_{cs}_/coverages/_{c}_** | Modifies coverage _{c}_. -**DELETE workspaces/_{ws}_/coveragestores/_{cs}_/coverages/_{c}_** | Deletes coverage _{c}_. +[**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_'. + ### Styles -A style describes how a resource (a feature type or a coverage) should be symbolized or rendered by a Web Map Service. -Styles are specified with SLD. +A style describes how a resource (a feature type or a coverage) should be symbolized or rendered by a WMS. Resource | Description ---------|------------ -**GET styles** | Returns a list containing all SLD styles. -**POST styles** | Creates a new SLD style. -**GET styles/_{s}_** | Returns style _{s}_. -**PUT styles/_{s}_** | Modifies style _{s}_. -**DELETE styles/_{s}_** | Deletes style _{s}_. +[**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_'. -### Layers +### Fonts -A layer is a data resource that could be published by a OGC Web Service. -So a layer is the combination of data (feature type or coverage) plus styling (in case of OGC:WMS). +Configures available fonts. Resource | Description ---------|------------ -[**GET layers**](pages/layers.md#get-layers) | Returns a list containing all layers. -[**POST layers**](pages/layers.md#post-layers) | Creates a new layer. -[**GET layers/_{l}_**](pages/layers.md#get-layersl) | Returns layer _{l}_. -[**PUT layers/_{l}_**](pages/layers.md#put-layersl) | Modifies layer _{l}_. -[**DELETE layers/_{l}_**](pages/layers.md#delete-layersl) | Deletes layer _{l}_. -**GET layers/_{l}_/styles** | Returns a list containing all styles associated to layer _{l}_. -**DELETE layers/_{l}_/styles/_{s}_** | Removes style _{s}_ from layer _{l}_. -**GET layers/_{l}_/fields** | Returns a list containing all fields associated to layer _{l}_. +[**GET fonts**](resources/get-fonts.md) | Returns the list of available fonts. +[**PUT fonts**](resources/put-fonts.md) | Uploads fonts from a local source. -### Layer groups +### Layers -A layergroup is a grouping of layers and styles that can be accessed as a single layer in a OGC:WMS GetMap request. +A layer is a data resource that could be published by a OGC Web Service. +So a layer is the combination of data (feature type or coverage) plus styling. Resource | Description ---------|------------ -**GET layergroups** | Returns a list containing all existing layer groups. -**POST layergroups** | Creates a new layer group. -**GET layergroups/_{lg}_** | Returns layer group _{lg}_. -**PUT layergroups/_{lg}_** | Modifies layer group _{lg}_. -**DELETE layergroups/_{lg}_** | Delete layer group _{lg}_. +[**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_'. -### OGC Web Services +### Layer groups -Controls the settings of OWS services (available for OGC:WMS, OGC:WFS and OGC:WCS). +A layergroup is a grouping of layers and styles that can be accessed as a single layer in a WMS GetMap request. Resource | Description ---------|------------ -**GET service/[wms,wfs,wcs]/setting** | Returns the status of the main OGC service. -**PUT service/[wms,wfs,wcs]/setting** | Enables or disables the main OGC service. +[**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_'. -### Fonts -Configures available fonts. +### OGC Web Services + +Controls the settings of OWS services (available for WMS, WFS and WCS). Resource | Description ---------|------------ -**GET fonts** | Returns the list of available fonts. -**PUT fonts** | Uploads fonts from a local source. +[**GET service/[wms,wfs,wcs]/setting**](resources/get-ogc-settings.md) | Returns the status of the OGC service. +[**PUT service/[wms,wfs,wcs]/setting**](resources/put-ogc-settings.md) | Enables or disables the OGC service. diff --git a/docs/pages/coveragestores.md b/docs/pages/coveragestores.md deleted file mode 100644 index 30404ce..0000000 --- a/docs/pages/coveragestores.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/docs/pages/datastores.md b/docs/pages/datastores.md deleted file mode 100644 index 31f4a0d..0000000 --- a/docs/pages/datastores.md +++ /dev/null @@ -1,380 +0,0 @@ -## Data stores & Feature types - -A data store is a source of spatial data that is vector based. - -A data store is a connection to a data source as implied by OGR library. -It could be a shapefile, a PostGIS database or any other data type supported by OGR. - -A feature type is a data set that originates from a data store. - - -### GET workspaces/{ws}/datastores - -Returns a list containing data stores in workspace. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Exemple request - -**GET** http://hostname/workspaces/my_workspace/datastores.json - -#### Response - -**Status code:** `200 OK` - - { - "dataStores": [ - { - "href": "http://hostname/workspaces/my_workspace/datastores/my_fisrt_datastore.json", - "name": "my_fisrt_datastore" - } - { - "href": "http://hostname/workspaces/my_workspace/datastores/my_second_datastore.json", - "name": "my_second_datastore" - } - ] - } - - -### POST workspaces/{ws}/datastores - -Creates a new data store in workspace. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**POST** http://hostname/workspaces/my_workspace/datastores.json - -**POST Content-type:** `application-json` - -**POST data:** - - { - "dataStore": { - "name": "pg_sample", - "enabled": true, - "connectionParameters": { - "host": "127.0.0.1", - "user": "postgres", - "database": "dbname", - "dbtype": "postgis", - "password": "postgres", - "port": "5432" - } - } - } - -#### Response - -**Status code:** `201 Created` - -**Location:** `http://hostname/workspaces/my_workspace/datastores/pg_sample.json` - - -### GET workspaces/{ws}/datastores/{ds} - -Returns data store {ds}. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Example request - -**GET** http://hostname/workspaces/my_workspace/datastores/pg_sample.json - -#### Response - -**Status code:** `200 OK` - - { - "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" - } - } - } - - -### PUT workspaces/{ws}/datastores/{ds} - -Modifies data store {ds}. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**PUT http://hostname/workspaces/my_workspace/datastores/pg_sample.json - -**PUT Content-type:** `application-json` - -**PUT Data:** - - { - "dataStore": { - "name": "pg_sample", - "enabled": false, - "connectionParameters": { - "dbtype": "postgis", - "host": "127.0.0.1", - "port": "5432", - "database": "my_dbname", - "user": "mra", - "password": "foo" - }, - } - } - -#### Response - -**Status code:** `201 Created` - -**Location:** `http://hostname/workspaces/my_workspace/datastores/pg_sample.json` - - -### DELETE workspaces/{ws}/datastores/{ds} - -Deletes data store {ds}. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**DELETE** http://hostname/workspaces/my_workspace/datastores/pg_sample.json - -#### Response - -**Status code:** `200 OK` - - -### PUT workspaces/{ws}/datastores/{ds}/file{.extension} - -Uploads a file from a local source and creates the data store. -File must be zipped. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}/file{.extension} - -#### Available formats - -SHP (ShapeFile). - -#### Example request - -**PUT** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/file.shp - -**PUT Content-type:** `application-zip` - -**PUT binary-data** - -#### Response - -**Status code:** `200 OK` - - -### GET workspaces/{ws}/datastores/{ds}/featuretypes - -Returns all feature type in data store. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}/featuretypes{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Example request - -**GET** http://hostname/workspaces/my_workspace/datastores/my_datastore/featuretypes.json - -#### Response - -**Status code:** `200 OK` - - { - "featureTypes": [ - { - "name": "my_first_featuretype", - "href": "http://hostname/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" - } - ] - } - -### POST workspaces/{ws}/datastores/{ds}/featuretypes - -Configures a new feature type in data store. The feature type musts exit. - -This operation creates automatically the associated [layer](layers.md#get-layers). - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}/featuretypes{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**POST** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes.json - -**POST Content-type:** `application-json` - -**POST data:** - - { - "featureType": { - "name": "ne_110m_admin_0_countries", - } - } - } - -#### Response - -**Status code:** `201 Created` - -**Location:** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json - - -### GET workspaces/{ws}/datastores/{ds}/featuretypes/{ft} - -Returns the feature type. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}/featuretypes/{ft}{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**GET** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json - -#### Response - -**Status code:** `200 OK` - - { - "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" - } - } - } - -### DELETE workspaces/{ws}/datastores/{ds}/featuretypes/{ft} - -Removes the configuration of the feature type. - -#### Resource URL - -http://hostname/workspaces/{ws}/datastores/{ds}/featuretypes/{ft}{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**DELETE** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json - -#### Response - -**Status code:** `200 OK` diff --git a/docs/pages/fonts.md b/docs/pages/fonts.md deleted file mode 100644 index 30404ce..0000000 --- a/docs/pages/fonts.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/docs/pages/layergroups.md b/docs/pages/layergroups.md deleted file mode 100644 index 30404ce..0000000 --- a/docs/pages/layergroups.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/docs/pages/layers.md b/docs/pages/layers.md deleted file mode 100644 index 2bf3a12..0000000 --- a/docs/pages/layers.md +++ /dev/null @@ -1,157 +0,0 @@ -## Layers - -A layer is a data resource that could be published by a OGC Web Service. So a layer is the combination of data (feature type or coverage) plus styling (in case of OGC:WMS). - -### GET layers - -Returns a list of all existing layers. - -#### Resource URL - -http://hostname/layers{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Exemple request - -**GET** http://hostname/layers.json - -#### Response - -**Status code:** `200 OK` - - { - "layers": [ - { - "name": "ne_110m_admin_0_countries", - "href": "http://hostname/layers/ne_110m_admin_0_countries.json" - } - ] - } - - -### POST layers - -Creates a new layers. - -#### Resource URL - -http://hostname/layers{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Exemple request - -**POST** http://hostname/layers.json - -**POST Content-type:** `application-json` - -**POST data:** - - { - "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"} - } - } - -#### Response - -**Status code:** `201 Created` - -**Location:** http://hostname/layer/just_countries.json - - -### GET layers/{l} - -Returns the layer {l}. - -#### Resource URL - -http://hostname/layers/{l}{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Exemple request - -**GET** http://hostname/layers/ne_110m_admin_0_countries.json - -#### Response - -**Status code:** `200 OK` - - { - "layer": { - "name": "ne_110m_admin_0_countries", - "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" - } - } - - -### PUT layers/{l} - -Modifies the configuration of the layer {l}. - -#### Resource URL - -http://hostname/layers/{l}{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Exemple request - -**PUT** http://hostname/layers/ne_110m_admin_0_countries.json - -**POST Content-type:** `application-json` - -**POST data:** - - { - "layer": { - "title": "Countries", - "abstract" : "Countries distinguish between metropolitan and independent and semi-independent portions of sovereign states." - } - } - -#### Response - -**Status code:** `200 OK` - - -### DELETE layers/{l} - -Deletes the layer {l}. - -#### Resource URL - -http://hostname/layers/{l}{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Exemple request - -**DELETE** http://hostname/layers/ne_110m_admin_0_countries.json - -#### Response - -**Status code:** `200 OK` diff --git a/docs/pages/ogc-web-service.md b/docs/pages/ogc-web-service.md deleted file mode 100644 index 30404ce..0000000 --- a/docs/pages/ogc-web-service.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/docs/pages/styles.md b/docs/pages/styles.md deleted file mode 100644 index 30404ce..0000000 --- a/docs/pages/styles.md +++ /dev/null @@ -1 +0,0 @@ -TODO \ No newline at end of file diff --git a/docs/pages/workspaces.md b/docs/pages/workspaces.md deleted file mode 100644 index 2b20eba..0000000 --- a/docs/pages/workspaces.md +++ /dev/null @@ -1,97 +0,0 @@ -## Workspaces - -A workspace is a grouping of [data stores](datastores.md) and [coverages stores](coveragestores.md). - -### GET workspaces - -Returns a list containing all workspaces. - -#### Resource URL - -http://hostname/workspaces{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Example request - -**GET** http://hostname/workspaces.json - -##### Response - -**Status code:** `200 OK` - - { - "workspaces": [ - { - "href": "http://hostname/workspaces/my_workspace.json", - "name": "sample" - } - ] - } - -### POST workspaces - -Creates a new workspace. - -#### Resource URL - -http://hostname/workspaces{.extension} - -#### Available formats - -JSON, XML. - -#### Example request - -**POST** http://hostname/workspaces.json - -**POST Content-type:** `application-json` - -**POST data:** - - { - "workspace": - { - "name": "another_workspace" - } - } - -##### Response - -**Status code:** `201 OK` - -**Location:** `http://hostname/workspaces/my_workspace.json` - -### GET workspaces/{ws} - -Returns workspace {ws}. - -#### Resource URL - -http://hostname/workspaces/{ws}{.extension} - -#### Available formats - -HTML (default value), JSON, XML. - -#### Example request - -**GET** http://hostname/workspaces/my_workspace.json - -##### Response - -**Status code:** `200 OK` - - { - "workspace": { - "name": "my_workspace", - "dataStores": { - "href": "http://hostname/workspaces/my_workspace/datastores.json" - }, - "coverageStores": { - "href": "http://hostname/workspaces/my_workspace/coveragestores.json" - } - } - } diff --git a/docs/resources/delete-featuretype.md b/docs/resources/delete-featuretype.md new file mode 100644 index 0000000..e9be3b8 --- /dev/null +++ b/docs/resources/delete-featuretype.md @@ -0,0 +1,19 @@ +### DELETE workspaces/{ws}/datastores/{ds}/featuretypes/{ft} + +Removes the configuration of the feature type. + +#### Resource URL + +http://hostname/workspaces/{ws}/datastores/{ds}/featuretypes/{ft}{.extension} + +#### Available formats + +JSON, XML. + +#### Example request + +**DELETE** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json + +#### Response + +**Status code:** `200 OK` diff --git a/docs/resources/delete-layer.md b/docs/resources/delete-layer.md new file mode 100644 index 0000000..0533899 --- /dev/null +++ b/docs/resources/delete-layer.md @@ -0,0 +1,19 @@ +### DELETE layers/_l_ + +Deletes the layer `_l_'. + +#### Resource URL + +http://_hostname_/layers/_l.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple request + +**DELETE** http://hostname/layers/ne_110m_admin_0_countries.json + +#### Response + +**Status code:** `200 OK` diff --git a/docs/resources/delete-workspace.md b/docs/resources/delete-workspace.md new file mode 100644 index 0000000..e44f7a7 --- /dev/null +++ b/docs/resources/delete-workspace.md @@ -0,0 +1,3 @@ +### DELETE workspaces/_ws_ + +`TODO` \ No newline at end of file diff --git a/docs/resources/get-datastore.md b/docs/resources/get-datastore.md new file mode 100644 index 0000000..e7805b4 --- /dev/null +++ b/docs/resources/get-datastore.md @@ -0,0 +1,43 @@ +### GET workspaces/_ws_/datastores/_ds_ + +Returns data store `_ds_'. + +#### Resource URL + +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 diff --git a/docs/resources/get-datastores.md b/docs/resources/get-datastores.md new file mode 100644 index 0000000..5c3defa --- /dev/null +++ b/docs/resources/get-datastores.md @@ -0,0 +1,34 @@ +### GET workspaces/_ws_/datastores + +Returns a list containing data stores in workspace `_ws_'. + +#### Resource URL + +http://_hostname_/workspaces/_ws_/datastores_.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple request + +**GET** http://hostname/workspaces/my_workspace/datastores.json + +#### Response + +**Status code:** `200 OK` + +```json +{ + "dataStores": [ + { + "href": "http://hostname/workspaces/my_workspace/datastores/my_fisrt_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 new file mode 100644 index 0000000..3839f88 --- /dev/null +++ b/docs/resources/get-featuretype.md @@ -0,0 +1,75 @@ +### GET workspaces/_ws_/datastores/_ds_/featuretypes/_ft_ + +Returns the feature type `_ft_'. + +#### Resource URL + +http://_hostname_/workspaces/_ws_/datastores/_ds_/featuretypes/_ft.format_ + +#### Available formats + +JSON, XML. + +#### Example request + +**GET** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json + +#### Response + +**Status code:** `200 OK` + +```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 diff --git a/docs/resources/get-featuretypes.md b/docs/resources/get-featuretypes.md new file mode 100644 index 0000000..5c573b2 --- /dev/null +++ b/docs/resources/get-featuretypes.md @@ -0,0 +1,34 @@ +### GET workspaces/_ws_/datastores/_ds_/featuretypes + +Returns all feature type in data store `_ds_'. + +#### Resource URL + +http://_hostname_/workspaces/_ws_/datastores/_ds_/featuretypes_.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Example request + +**GET** http://hostname/workspaces/my_workspace/datastores/my_datastore/featuretypes.json + +#### Response + +**Status code:** `200 OK` + +```json +{ + "featureTypes": [ + { + "name": "my_first_featuretype", + "href": "http://hostname/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" + } + ] +} +``` \ No newline at end of file diff --git a/docs/resources/get-layer.md b/docs/resources/get-layer.md new file mode 100644 index 0000000..e7749b3 --- /dev/null +++ b/docs/resources/get-layer.md @@ -0,0 +1,37 @@ +### GET layers/_l_ + +Returns the layer `_l_'. + +#### Resource URL + +http://_hostname_/layers/_l.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple request + +**GET** http://hostname/layers/ne_110m_admin_0_countries.json + +#### Response + +**Status code:** `200 OK` + +```json +{ + "layer": { + "name": "ne_110m_admin_0_countries", + "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" + } +} +``` \ No newline at end of file diff --git a/docs/resources/get-layers.md b/docs/resources/get-layers.md new file mode 100644 index 0000000..7a62199 --- /dev/null +++ b/docs/resources/get-layers.md @@ -0,0 +1,30 @@ +### GET layers + +Returns a list of all existing layers. + +#### Resource URL + +http://_hostname_/layers_.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple request + +**GET** http://hostname/layers.json + +#### Response + +**Status code:** `200 OK` + +```json +{ + "layers": [ + { + "name": "ne_110m_admin_0_countries", + "href": "http://hostname/layers/ne_110m_admin_0_countries.json" + } + ] +} +``` \ No newline at end of file diff --git a/docs/resources/get-workspace.md b/docs/resources/get-workspace.md new file mode 100644 index 0000000..ea711d0 --- /dev/null +++ b/docs/resources/get-workspace.md @@ -0,0 +1,33 @@ +### GET workspaces/_ws_ + +Returns workspace `_ws_'. + +#### Resource URL + +http://_hostname_/workspaces/_ws.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Example request + +**GET** http://hostname/workspaces/my_workspace.json + +##### Response + +**Status code:** `200 OK` + +```json +{ + "workspace": { + "name": "my_workspace", + "dataStores": { + "href": "http://hostname/workspaces/my_workspace/datastores.json" + }, + "coverageStores": { + "href": "http://hostname/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 new file mode 100644 index 0000000..4813b1c --- /dev/null +++ b/docs/resources/get-workspaces.md @@ -0,0 +1,30 @@ +### GET workspaces + +Returns a list containing all workspaces. + +#### Resource URL + +http://_hostname_/workspaces_.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Example request + +**GET** http://hostname/workspaces.json + +##### Response + +**Status code:** `200 OK` + +```json +{ + "workspaces": [ + { + "href": "http://hostname/workspaces/my_workspace.json", + "name": "sample" + } + ] +} +``` \ No newline at end of file diff --git a/docs/resources/post-datastores.md b/docs/resources/post-datastores.md new file mode 100644 index 0000000..c0fb5ac --- /dev/null +++ b/docs/resources/post-datastores.md @@ -0,0 +1,42 @@ +### POST workspaces/_ws_/datastores + +Creates a new data store in workspace `_ws_'. + +#### Resource URL + +http://_hostname_/workspaces/_ws_/datastores/_ds.format_ + +#### Available formats + +JSON, XML. + +#### Example request + +**POST** http://hostname/workspaces/my_workspace/datastores.json + +**POST Content-type:** `application-json` + +**POST data:** + +```json +{ + "dataStore": { + "name": "pg_sample", + "enabled": true, + "connectionParameters": { + "host": "127.0.0.1", + "user": "postgres", + "database": "dbname", + "dbtype": "postgis", + "password": "postgres", + "port": "5432" + } + } +} +``` + +#### Response + +**Status code:** `201 Created` + +**Location:** `http://hostname/workspaces/my_workspace/datastores/pg_sample.json` diff --git a/docs/resources/post-featuretypes.md b/docs/resources/post-featuretypes.md new file mode 100644 index 0000000..edb3aa4 --- /dev/null +++ b/docs/resources/post-featuretypes.md @@ -0,0 +1,37 @@ +### POST workspaces/_ws_/datastores/_ds_/featuretypes + +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_ + +#### Available formats + +JSON, XML. + +#### Example request + +**POST** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes.json + +**POST Content-type:** `application-json` + +**POST data:** + +```json +{ + "featureType": { + "name": "ne_110m_admin_0_countries", + } + } +} +``` + +#### Response + +**Status code:** `201 Created` + +**Location:** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/featuretypes/ne_110m_admin_0_countries.json diff --git a/docs/resources/post-layers.md b/docs/resources/post-layers.md new file mode 100644 index 0000000..e5bbd6e --- /dev/null +++ b/docs/resources/post-layers.md @@ -0,0 +1,35 @@ +### POST layers + +Creates a new layers. + +#### Resource URL + +http://_hostname_/layers_.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple request + +**POST** http://hostname/layers.json + +**POST Content-type:** `application-json` + +**POST 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"} + } +} +``` + +#### Response + +**Status code:** `201 Created` + +**Location:** http://hostname/layer/just_countries.json diff --git a/docs/resources/post-workspaces.md b/docs/resources/post-workspaces.md new file mode 100644 index 0000000..ae7d3ee --- /dev/null +++ b/docs/resources/post-workspaces.md @@ -0,0 +1,34 @@ +### POST workspaces + +Creates a new workspace. + +#### Resource URL + +http://_hostname_/workspaces_.format_ + +#### Available formats + +JSON, XML. + +#### Example request + +**POST** http://hostname/workspaces.json + +**POST Content-type:** `application-json` + +**POST data:** + +```json +{ + "workspace": + { + "name": "another_workspace" + } +} +``` + +##### Response + +**Status code:** `201 OK` + +**Location:** `http://hostname/workspaces/my_workspace.json` \ No newline at end of file diff --git a/docs/resources/put-datastore-file.md b/docs/resources/put-datastore-file.md new file mode 100644 index 0000000..aeb6a72 --- /dev/null +++ b/docs/resources/put-datastore-file.md @@ -0,0 +1,28 @@ +### PUT workspaces/_ws_/datastores/_ds_/file_.extension_ + +Uploads a file from a local source and creates the data store `_ds_'. +File must be zipped. + +#### Resource URL + +http://_hostname_/workspaces/_ws_/datastores/_ds_/file_.extension_ + +#### Available extensions + +SHP (ShapeFile). + +#### Parameters + +`TODO` + +#### Example request + +**PUT** http://hostname/workspaces/my_workspace/datastores/ne_110m_admin_0_countries/file.shp + +**PUT Content-type:** `application-zip` + +**PUT binary-data** + +#### Response + +**Status code:** `200 OK` diff --git a/docs/resources/put-datastore.md b/docs/resources/put-datastore.md new file mode 100644 index 0000000..2ff343a --- /dev/null +++ b/docs/resources/put-datastore.md @@ -0,0 +1,42 @@ +### PUT workspaces/_ws_/datastores/_ds_ + +Modifies data store `_ds_'. + +#### Resource URL + +http://_hostname_/workspaces/_ws_/datastores/_ds.format_ + +#### Available formats + +JSON, XML. + +#### Example request + +**PUT http://hostname/workspaces/my_workspace/datastores/pg_sample.json + +**PUT Content-type:** `application-json` + +**PUT Data:** + +```json +{ + "dataStore": { + "name": "pg_sample", + "enabled": false, + "connectionParameters": { + "dbtype": "postgis", + "host": "127.0.0.1", + "port": "5432", + "database": "my_dbname", + "user": "mra", + "password": "foo" + }, + } +} +``` + +#### Response + +**Status code:** `201 Created` + +**Location:** `http://hostname/workspaces/my_workspace/datastores/pg_sample.json` diff --git a/docs/resources/put-featuretype.md b/docs/resources/put-featuretype.md new file mode 100644 index 0000000..62d1fe9 --- /dev/null +++ b/docs/resources/put-featuretype.md @@ -0,0 +1,3 @@ +### PUT workspaces/_ws_/datastores/_ds_/featuretypes/_ft_ + +`TODO` diff --git a/docs/resources/put-layer.md b/docs/resources/put-layer.md new file mode 100644 index 0000000..6ea5b30 --- /dev/null +++ b/docs/resources/put-layer.md @@ -0,0 +1,32 @@ +### PUT layers/_l_ + +Modifies the configuration of the layer `_l_'. + +#### Resource URL + +http://_hostname_/layers/_l.format_ + +#### Available formats + +HTML (default value), JSON, XML. + +#### Exemple request + +**PUT** http://hostname/layers/ne_110m_admin_0_countries.json + +**PUT Content-type:** `application-json` + +**PUT data:** + +```json +{ + "layer": { + "title": "Countries", + "abstract" : "Countries distinguish between metropolitan and independent and semi-independent portions of sovereign states." + } +} +``` + +#### Response + +**Status code:** `200 OK` diff --git a/docs/resources/put-workspace.md b/docs/resources/put-workspace.md new file mode 100644 index 0000000..d3be5ea --- /dev/null +++ b/docs/resources/put-workspace.md @@ -0,0 +1,3 @@ +### PUT workspaces/_ws_ + +`TODO` \ No newline at end of file -- GitLab