Part of 5.0 and used by the GenUIne adminCentral
ObservedManager that discovers REST endpoints at runtime configured in modules. Done.
About HTTP Methods:
- GET and POST are supported by all browsers, the rest are quirky to say the least
- PUT would be nice for create
- DELETE would be nice for delete
- IPSecurity filter blocks all but GET and POST
- Some frameworks simluate methods using a query param named _method
REST endpoint taxonomy:
AdminCentral
login endpoint
module manager ui
Website (.magnolia/rest/website)
- get child pages
- method: GET
- path: .magnolia/rest/website/<path>
- arguments: path in uri
- returns: WebsitePageList
- create page
- method: PUT
- path: .magnolia/rest/website/<path>
- arguments: path in uri
- returns WebsitePage
- delete page
- method: DELETE
- path: .magnolia/rest/website/<path>
- arguments: path in uri
- update page (name, title, template)
- method: POST
- path: .magnolia/rest/website/<path>/update
- arguments: WebsitePage (only name, title and template sticks)
- search pages
- activate page
- method: POST
- path: .magnolia/rest/website/<path>/activate
- deactivate page
- method: POST
- path: .magnolia/rest/website/<path>/deactivate
- move page
- method: POST
- path: .magnolia/rest/website/<path>/move
- arguments: to=<website path>
- copy page
- method: POST
- path: .magnolia/rest/website/<path>/copy
- arguments: to=<website path>
- edit page using dialog (page properties)
- method: POST
- path: .magnolia/rest/website/<path>/edit
- arguments: dialog=<dialogName>
- returns: a dialog structure with values from the repository
- save page using dialog (page properties)
- method: POST
- path: .magnolia/rest/website/<path>/save
- arguments: dialog=<dialogName> and a whole bunch of parameters needed to represent the values
- returns: OK or a validation error structure
- list versions
- method: POST
- path: .magnolia/rest/website/<path>/versions
- returns: ?
- revert to version
- method: POST
- path: .magnolia/rest/website/<path>/revert/<version>
- import + export
- transport is already defined as an XML document
Templating (.magnolia/rest/templating ?)
- get paragraph definitions (for select paragraph dialog)
- method GET
- path .magnolia/rest/templating/paragraphs
- arguments
- paragraphs - comma seperated list of paragraphs
- returns ParagraphDefinitionList
- add paragraph using dialog
- method POST
- path .magnolia/rest/templating
- todays sends in repository, path, nodeCollection and node=mgnlNew
- edit paragraph using dialog
- today sends in paragraphName, is this necessary, can we send in a dialogName instead?
- move paragraph (within node collection)
- delete paragraph
Dialogs (.magnolia/rest/dialogs/)
- load dialog
- method GET
- path .magnolia/rest/dialogs/<dialogName>
- arguments
- mgnlRepository
- mgnlPath
- mgnlNodeCollectionName
- mgnlNode
- returns
- Dialog populated from repository
- example /.magnolia/rest/dialogs/howTo?mgnlRepository=website&mgnlPath=/howTo-jsp/main/0
- create node with dialog
- method POST
- path .magnolia/rest/dialogs/<dialogName>/create
- arguments
- mgnlRepository
- mgnlPath
- mgnlNodeCollectionName
- mgnlNode
- returns
- ValidationResult
- example /.magnolia/rest/dialogs/howTo/create?mgnlRepository=website&mgnlPath=/howTo-jsp&mgnlNodeCollectionName=main&title=ASDFGH12345
- update node with dialog
- method POST
- path .magnolia/rest/dialogs/<dialogName>/update
- arguments
- mgnlRepository
- mgnlPath
- mgnlNodeCollectionName
- mgnlNode
- returns
- ValidationResult
- example /.magnolia/rest/dialogs/howTo/update?mgnlRepository=website&mgnlPath=/howTo-jsp/main/0&title=ASDFGH12345
Repository (.magnolia/rest/repository/<repositoryName>/)
CRUD for supported item types
How do we return both the new state of modified nodes and messages like activation failures?
Security (.magnolia/rest/security)
(all of these actions will probably be doable using the repository endpoint, if thats the case this endpoint is useless)
list users, roles, groups
CRUD users, roles, groups
Module Store (.magnolia/rest/modulestore ?)
list installed modules
list available modules
get module info
Workflow
Data Module
DMS
+ Tools, Configuration, custom commands and so on