<= [[plugin:struct|Struct Plugin]] ====== remote API ====== The struct plugin exposes several methods that can be accessed via the [[devel:xmlrpc|XML-RPC API]]. You can find the current code in the [[https://github.com/cosmocode/dokuwiki-plugin-struct/blob/master/remote.php|remote.php]] Note: The method names are prefixed with ''plugin.struct.'', for example ''plugin.struct.getSchema'' ===== Methods ===== * **''getData()''** //Get the structured data of a given page// - parameter: **string** //The page to get data for// - parameter: **string** //The schema to use, empty for all// - parameter: **int** //A timestamp if you want historic data (0 for now)// * returns: **array** ''('schema' => ( 'fieldlabel' => 'value', ...))'' * **''saveData()''** //Saves data for a given page (creates a new revision)//\\ If this call succeeds you can assume your data has either been saved or it was not necessary to save it because the data already existed in the wanted form or the given schemas are no longer assigned to that page. - parameter: **string** //page// - parameter: **array** ''('schema' => ( 'fieldlabel' => 'value', ...))'' - parameter: **string** //summary// * return **bool** //returns always true// * **''getSchema()''** //Get info about existing schemas columns//\\ Returns only current, enabled columns - parameter: **string** //the schema to query, empty for all// * return **array** * **''getAggregationData()''** //Get the data that would be shown in an aggregation// - parameter: **array** //array of strings with the schema-names// - parameter: **array** //array of strings with the columns// - parameter: **array** //array of arrays with// ''['logic'=> 'and'|'or', 'condition' => 'your condition']'' - parameter: **string** //string indicating the column to sort by// * return **array** //array of rows, each row is an array of the column values// Postman example for getAggregationData(), as raw data: plugin.struct.getAggregationData myschema colour logic and condition colour=red colour