Talk:RESTful API
From MapbenderWiki
Contents |
Introduction
This page is dedicated to the GSoC project RESTful API for Mapbender.
User Stories
These user stories are the starting point for designing the resources and their representations. From this list we should be able to derive objects that we can describe clearly. These clearly defined objects should also be referenced in the Category:Glossary.
Publish Service
User finds a new service / creates a new service and wants to publish it. All that is needed to register a new service is a user name (authentication) with email for confirmation, the Capabilities URL of the service and whether it should be public.
Q: What happens if this URL (or a similar one?) has already been uploaded earlier? Add a counter for the the same URL (uploaded several times)?
A: The Capabilities URL needs to be checked against the ones already in the database. -> What happens then?
Q: What happens if the user gets "lost", is deleted, etc.?
A: ?
Q: What happens if the service is deleted by another user? (This is currently not possible, it would generate an error message).
A: ?
Q: What happens if Mapbender cannot read the capabilities document?
A: Error message & ?
Update Service
Q: Are we also going to use the Publish URL to update services or do we need to create another one?
A: ?
Search for a Service
User searches for a service by entering a search term.
This feature might use the OpenSearch syntax?
Q: Which fields are queried by searches?
A: See SearchInterface
Q: What is returned by a search? Just the URL, description, abstract, more information?
A: ?See SearchInterface
Maybe the things are already done, someone can produce a further wrapper for opensearch and/or CSW
Demo
- Just have a look at:
Update Metadata of a Service
User has new or updated Metadata and wants to add this to an entry in the Mapbender back end. The user has to authenticate. Users can only update their own services. Somehow there must be a possibility to set a update period - a timespan after which the service should be updated automatically. No user will update his service so many times. Maybe the service capabilities are well defined and all relevant Metadata is delivered by the service his own. In such an optimal case the update is done to search for new content in the service - maybe new layers or new featuretypes. There should be a parameter which defines that the service should be automatically updated (harvetsted)
- every day
- every week
- every month
Comment on a Service
A user wants to add a comment to a service she does not own. For example:
- Good to use
- Very fast / slow
- Good / bad quality
- ...and so on
Add User
Designing the Resource:User.
A new user wants to upload a service or update metadata or wants to comment on a service found in the Mapbender backend owned by someone else. To do this the user must exist in the Mapbender backend.
- Create new user
- What happens if the authentication takes place else where - meaning that we receive the request from an authenticated user that does not exist in the database yet?
- What if the user of the remote authentication changes / disappear but the person behind the user wants to take over the role of the other user. Another scenario could be to merge existing users.
