Skip to content

Data

Once you start customizing the API and adding your own API endpoints, there is a lot to know about how to interact with data in the callback functions.

Data provider functions

In an API endpoint route, you have access to all of the native data provider functions. Here's a list:

$this->kirby();
$this->site();
$this->page($pageId);
$this->file($pageId, $filename);
$this->user($userId = null);
$this->users();

Learn more about creating custom data functions ›.

Models

Docs are coming soon…

Collections

Docs are coming soon…