The Development Tools module provides a basis for creating plugins to interact with a running Magnolia instance. Using the endpoints provided by this module you can create interactive IDEs with intellisense features to help facilitate the development process.
Installing
Module not completed yet. Proposed API shown below.
<dependency> <groupId>info.magnolia.development</groupId> <artifactId>magnolia-development-tools</artifactId> <version>${notYetReleased}</version> </dependency>
Usage
This module comes with a REST endpoint for querying the different definition registries.
Registry Endpoint
Returns registry data in the form of a JSON object.
Request URL
/.rest/registry/v1/{registry}/{module}
Parameter | Description | Parameter type | Data type |
| required The name of the registry to access. Get all items from a specific registry. Example: |
|
|
module | optional Used together with a | path | String |
type | optional Used together with a | query | String |
| optional, default is Used together with a |
|
|
Example: Get all modules
Get all the modules from the ModuleRegistry
.
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/registry/v1/modules' \ -u superuser:superuser
Example: Get a list of definition registries used by a module
Query a specific module for the definition types it provides.
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/registry/v1/modules/ui-framework' \ -u superuser:superuser
[ "dialogs", "fieldTypes" ]
Example: Get a list of definitions for a specific type
Get a list of all definitions by type. This will include the relative path if one exists.
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/registry/v1/modules/ui-framework?type=dialogs \ -u superuser:superuser
[ "folder", "importZip", "rename" ]
Example: Get all modules providing definitions
Get all the modules which provide definitions.
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/registry/v1/modules?onlyDefinitionProviders=true' \ -u superuser:superuser
Repository Endpoint
Create the workspace and node type. The access permissions on the workspace are created for the superuser.
Request URL
/.rest/repository/v1/workspace/{name}
Parameter | Description | Parameter type | Data type |
| required The name of the workspace to be created. |
|
|
Example: Create a workspace
Create a workspace named events with a node type name event.
If the workspace name is plural (i.e. ending in 's') then then node type will be created singular. Otherwise the node type will have the same name as the workspace.
curl -X GET 'http://localhost:8080/magnoliaAuthor/.rest/repository/v1/workspace/events' \ -u superuser:superuser
{ Workspace events created }
Source Code
The source for this module can be found here: https://git.magnolia-cms.com/projects/FORGE/repos/development-tools/browse
Issues, Bugs, Improvements
Either comment on this page or open a ticket here: DEVTOOLS