This repository was archived by the owner on Mar 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
MapCatalog API Reference
nicolas-f edited this page Oct 8, 2012
·
13 revisions
This is a draft of the API Specification of the MapCatalog.
In any of the API calls below, any input error will return
Status: 400 Bad Request
The content of the response can contain a plain text explanation of the problem.
The authentication key (managed by the application) has to be given with the following parameter key=value
Ex : To list workspaces with the key GET /map/workspaces?key=Jdj7oOplmlsS
GET /workspaces
None
Status: 200 OK
<?xml version="1.0" encoding="utf-8"?>
<workspaces>
<workspace>
<name>default</name>
</workspace>
<workspace>
<name>toto</name>
</workspace>
...
</workspaces>GET /workspaces/:name/contexts
- name (required): the name of the workspace
Status: 200 OK
<?xml version="1.0" encoding="utf-8"?>
<contexts>
<context id="0" date="2012-09-12">
<title>My custom context</title>
<abstract>Some text here.</abstract>
</context>
<context id="1" date="2012-08-22" path="personal/">
<title>My context</title>
<abstract>Some interesting text here.</abstract>
</context>
...
</contexts>GET /workspaces/:name/contexts/:id
- name (required): the name of the workspace
- id (required): the identifier of the map context to retrieve
Status: 200 OK
<?xml version="1.0" encoding="utf-8"?>
<OWSContext id="3" version="0.4.2" xsi:schemaLocation="http://www.opengis.net/ows-context
http://geosysin.iict.ch/ogc_schemas/owc/owsContext_0.4.2.xsd">
...
<!-- the content of the context here -->
</OWSContext>POST /workspaces/:name/contexts
POST /workspaces/:name/contexts/*path
- name (required): the name of the workspace
- path (optional): the path of the map context
<?xml version="1.0" encoding="utf-8"?>
<OWSContext version="0.4.2" xsi:schemaLocation="http://www.opengis.net/ows-context
http://geosysin.iict.ch/ogc_schemas/owc/owsContext_0.4.2.xsd">
...
<!-- the content of the context here -->
</OWSContext>Status: 201 Created
<?xml version="1.0" encoding="utf-8"?>
<context id="1" date="2012-08-22">
<title>My context</title>
<abstract>Some interesting text here.</abstract>
</context>POST /workspaces/:name/contexts/:id
- name (required): the name of the workspace
- id (required): the identifier of the map context to retrieve
<?xml version="1.0" encoding="utf-8"?>
<OWSContext id="1" version="0.4.2" xsi:schemaLocation="http://www.opengis.net/ows-context
http://geosysin.iict.ch/ogc_schemas/owc/owsContext_0.4.2.xsd">
...
<!-- the content of the context here -->
</OWSContext>Status: 200 OK
<?xml version="1.0" encoding="utf-8"?>
<context id="1" date="2012-08-22">
<title>My context</title>
<abstract>Some interesting text here.</abstract>
</context>