Ticket #764 (closed New Feature)
HTTP API
| Reported by: | wolfram.mayer@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | Minor | Milestone: | |
| Component: | Repository - HTTP interface | Version: | 2.3 |
| Keywords: | Cc: |
Description
[jira2trac import : issue created on February 26, 2010 3:54:45 PM CET http://issues.cocoondev.org/browse/DSY-764 ]
Hi,
through the HTTP API it's possible to send HTTP GET/POST/DELETE but not e.g. PUT.
This means entities as e.g. can be read/updated or deleted.
Is there any option (planned) via Java API or HTTP API to create e.g. users or even create sites?
I am aware that users can be autogenerated e.g. with first login (based on Authentication Scheme). This works fine for us.
Furthermore I am aware that usually to create a new site daisy-wiki-add-site is called on the daisy server side.
It would be helpful to support a create of entities.
Kind Regards,
Wolfram Mayer
[jira2trac import : comment created by bruno on March 10, 2010 11:53:05 AM CET]
Hi,
Please in the future use the Daisy mailing list for asking general questions.
Users can be created via both the Java and HTTP API's, see Repository.getUserManager() in the Java API. In the HTTP API, all creates are done using POST to the 'collection URL' rather than PUT, since the server assigns the IDs.
For sites, the "API" or rather contract is to define them by creating directories & files in the sites directory. You can do this manually, or using the daisy-wiki-add-site script. You can of course also create these files from Java code, so you could provide your own API and/or HTTP interface to manage sites (such a thing could be added to Daisy itself, but this is not high-priority, by doing it yourself you can optimize it for your own needs). Note that sites are a feature of the front-end, so would not be part of the repository API.