Help topics

Read public content through the fast endpoint

The fast endpoint answers public reads from a separate PHP file, so your site or app gets content without the full REST API. Use it for public models only. Writes still go through the REST API.

Before you start

  • You need Morphic Pro with an active licence.
  • The model must allow public reads, because the fast endpoint serves only public models.

Steps

Copy the address from Settings, then request a model with it.

Step 1: Copy the fast endpoint address

  1. Go to Morphic > Settings.
  2. On the General tab, find the Fast endpoint row. It appears only when Pro is active.
  3. Select Copy.

Step 2: Request a model

  1. Add /items/ and the model's name to the address. For example: https://example.com/wp-content/plugins/morphic-pro/fast.php/items/articles.
  2. If your server does not pass the path after the file name, use fast.php?route=items/articles instead.

The endpoint returns JSON.

Result

  • Without an active licence, the endpoint answers HTTP 403 with the message "the fast endpoint needs an active Morphic Pro licence".
  • Other routes: items/<model>/<id> for one entry, find/<model>/<field>, by/<model>/<field>, edges/<id>/<name> and search/<model>.
  • A request that changes content, such as a POST, gets an error that says to write through the REST API.
  • The response sends an ETag. A request with a matching If-None-Match header gets HTTP 304 with no body.
  • When your site has an external object cache, answers are cached for 300 seconds.