SDI 4 Apps - Uptake of open geographic information through innovative services based on linked data

LayMan is a tool for publishing geodata. Its basic functionality has been described in previous blog here and its connection to CKAN in another blog here. Today, we will have a brief look at LayMan REST API v. 2.0.

LayMan REST API handles the whole communication between LayMan Server and LayMan Client. In version 2.0 the structure of the resources URL has been redesigned, the whole API has been documented and now is available for any other client application that may wish to talk to LayMan Server. Full documentation is available as a Google doc here.

To publish some geodata, say shapefile, the API offers standard REST methods to manipulate three main LayMan resources: Files, Data and Layers. Files are private and belong to user, Data (vectors in the database, rasters in the file system) and Layers are shared and belong to a group. With standard REST methods – GET, PUSH, PUT and DELETE – you can upload files, import them into the database, publish them with GeoServer, update data, change configuration, delete what is not needed any more etc.

The fact, that the REST API is in the core of LayMan design means one nice thing – whatever can be done with LayMan Client can be done with LayMan API as well – because this is exactly the way how Client and Server talk. If you come in troubles while implementing your own Client, you can install the LayMan Client, try things and observe the Client-Server communication to see in detail what is going on.

Beside the manipulation with the main LayMan resources, the API offers some CKAN calls that search in CKAN for publishable resources. Once an interesting CKAN resource is identified for publishng, its URL can be used as a parameter for publishing with the API.

LayMan code is available at github and more information about it can be found on LayMan github wiki.

Share this: