For instructions on how to get started with Kirby, see getkirby.com/docs/guide/quickstart.
For KQL Plugin documentation, see github.com/getkirby/kql.
.
└── site
├── blueprints
│ └── users
│ ├── api.yml
│ └── default.yml
├── config
│ └── config.php
└── plugins
└── kql
Assuming the official Plainkit or Starterkit as a starting point.
- Install Kirby dependencies:
composer install
. - Install the KQL plugin:
composer require getkirby/kql
. - Set up authentication:
- Create an API user and set user permissions in
/site/blueprints/users
. For more information, see documentation on roles and permissions. - Set up Basic Auth. Modify
/site/config/config.php
:
return [
'api' => [
'basicAuth' => true,
'allowInsecure' => true # TODO: remove pre-production
]
];
- Startup a local PHP server:
composer start
(or use an alternative: Laravel Valet/MAMP/…). - Go to the Panel (
{url}/panel
) and create an API user. Further, use these credentials to authorize requests to your API.
- Clone/download this repository.
- Run in terminal:
composer install
composer start
- Implement step 5 above.
Insomnia (testing)