-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rest db service #53
Comments
* rest-db main modules * cowboy rest db handler and xQuery main modules. The rest /db/ request endpoint enables POST, GET, PUT, DELETE requests to create, retrieve, update and delete xqerl database items. A GET on a DB collection will list database items. Checks are added to via feat.yml * add swtch on type, any, item or collection * add rest db checks * get can retrieve resources or collections * feat: return collections as text,xml or json * ci:(check) can list as text or json * refactor: add get_uri func * ci: comment out rm collection section * ci: rest api check unsupported media type * feat:only create if looks like a domain * ci: rest api checks * rm db-list, now in cd-retrieve * ci:(check) add HEAD check * ci:(check) HEAD also for collection lists
@zadean thanks for merging this. There is still work to be done!
|
One of the thing I had in mind for issue #48 was to create the basis for establishing services
based the cowboy rest handler and a main module server.
Both exist-db and baseX have generic service URI patterns
For baseX
existdb also has similar uri based services with the preferred one
for interaction with the exist db being the web rest api
http://localhost:8080/exist/rest/
@see https://exist-db.org/exist/apps/doc/devguide_rest
With pr #52 we have the following URI service patterns
so to extend this like baseX and existdb we would have
uri template:
/rest/{domain}/{path-to-collection}
=> collection handler/rest/{domain}/{path-to-collection}/item
=> item handlerthe handlers being cowboy rest handler
with xquery main modules doing the work interacting with the xqerl db
rest web interface for xqerl database collections
collections:
/rest/{domain}/{path-to-collection}
GET - lists uri items is collection
POST - create item for collection
DELETE - delete collection
OPTIONS - list request methods and request allowed post body types for collection
HEAD - collection availabilty
rest web interface for xqerl database items
resources:
/rest/{domain}/{path-to-collection}/item
GET - get item in collection
PUT - update item
DELETE - delete item
HEAD - item availabilty
and maybe patch using xquery updating expression
derived from a uri like
resources:
/rest/{domain}/{path-to-collection}/item?{type=update&key=value}
PATCH - update key value in item
or maybe xquery updating expression can be derived from
a JSON or XML body included in the PATCH request
The text was updated successfully, but these errors were encountered: