Global schema methods have existed for quite some time. Simply put, a global schema method is a special kind of custom schema method that is not associated with a type.
In previous versions of Structr this feature was hidden away with no obvious UI to create, manage or execute global methods. They had to be created via the "Data" section and were only
executable via the
call_privileged() functions or the Cron Service.
Over time global schema methods have received some love and are now a lot more accessible for backend users.
A dedicated editor for global schema methods was added to the existing schema editor interface. Thus there is no need to leave the "Schema" section to create/manage global schema methods.
In Structr 2.2, another way to execute global schema methods has been introduced: Calling them via REST.
Any administrative user can issue a POST to
maintenance/globalSchemaMethods/<METHOD_NAME> and execute this method named
<METHOD_NAME>. Parameters can optionally be sent along and read in the method using
Along with this feature, a UI has been created which enables users to execute global schema methods from the "Dashboard" in structr ui.
Any global schema can be run and the result is returned.
Download Structr 2.2
This feature - along with many more - is available in the Structr 2.2 release which can be downloaded directly from https://structr.org/download.
Or simply pull the most recent docker images from https://hub.docker.com/r/structr/structr/tags/ (automatically created for each release and snapshot version - also new in 2.2)