RestApi
RestApi copied to clipboard
Module to create a REST API with ProcessWire
Hi @thomasaull Just a note, when running PW as a subfolder, you have to define the API endpoint with the subfolder name. Example, if PW is installed in a `cms`...
Hi, I am trying to build a PW headless blog. Will be testing the module but just wanted to thank you in advance 💪
When creating a page in the api, the `$wire->addHookBefore('Pages::saveReady', function($event) { }` is not fired. This is the code in my API: `public static function addKite($data) { RestApiHelper::checkAndSanitizeRequiredParameters($data, [ 'title|string',...
2 changes message code header data
Is ther a way for using pretty print without changing your RestApi/Router.php file? Example: `if (wire('roles')->get("name=superuser")) { $beauty = JSON_PRETTY_PRINT; } echo json_encode($return, $beauty);`
I needed `Basic Auth` authentication method for a project. Feel free to revise and merge it if you think it can be a cool addition to the module.
Extended Install routine - added api template - added api fields - add api route container - added example route pages Changes to routes.php - added method to grab pw...