Statamic comes with a read-only API that allows you to deliver content from Statamic to your frontend, external apps, SPA, or any other desired location. Content is delivered RESTfully as JSON data. Runway includes support for Statamic’s Content API, which enables you to access your Eloquent models. If you prefer, Runway also supports GraphQL.Documentation Index
Fetch the complete documentation index at: https://runway.duncanmcclean.com/llms.txt
Use this file to discover all available pages before exploring further.
Enabling for resources
If you haven’t already done so, you’ll need to enable Statamic’s REST API. You can do this by adding the following line to your.env file:
config/statamic/api.php:
runway key to your resources array in config/statamic/api.php, and provide the handles of the resources for which you wish to enable the API:
Endpoints
Each resource will have two endpoints:/api/runway/{resourceHandle}for retrieving models associated with a resource./api/runway/{resourceHandle}/{id}for retrieving a specific model.
Filtering
To enable filtering for your resources, you’ll need to opt in by defining a list ofallowed_filters for each resource in your config/statamic/api.php configuration file: