No route found for path: "query" and request method: "POST"'

Hi, I’m now using Kirby 4 for headless.

When I used Kirby 3, it worked fine for headless. But somehow, I got this message and I don’t know why. Can you help me?

{
  status: 'error',
  message: 'No route found for path: "query" and request method: "POST"',
  code: 404,
  exception: 'Exception',
  key: null,
  file: '/kirby/src/Http/Router.php',
  line: 185,
  details: [],
  route: null
}

CONFIG

return [
    'api' => [
        'basicAuth' => true,
        // 'allowInsecure' => true,
    ],
    'debug' => true,

];

Which route were you querying? Could you please post the request?

Please use three backtips before and after a code block to properly format your code, thanks!

I was querying the route specified by the URL http://localhost:8000/api/query

I followed this explanation:
Going Headless | Kirby CMS"

When I downgraded Kirby to version 3.8, it worked. Here are the settings I used in the
composer.json file for this setup:

 "require": {
    "php": ">=8.0.0 <8.3.0",
    "getkirby/cms": "^3.8",
    "getkirby/kql": "^2.1"
  },

Kirby version 4

  "require": {
    "php": "~8.1.0 || ~8.2.0 || ~8.3.0",
    "getkirby/cms": "^4.0"
  },

And which version of Kirby KQL are you using?

If I use Composer to download Kirby 4, there is no KQL package

The api/query endpoint is only available if you install the KQL plugin, as explained in the recipe.

OMG, thank you!!! I completely forgot what KQL is