Skip to main content
This page gives you an introduction to the concept of routing. Go to schema references to find the API documentation for routing.
You can do routing by either Url or Handle.

URL

If you want your schema to be routable by an URL, you can specify the url as an expression. If we take a look at this example we can see that we have a Url property available in the Data Source
Source entity example
In the below example of the schema for this Data Source, we can see that the route is mapped to the url property on the Data Source. This means that you can get the data from this source by making a request to https://delivery.enterspeed.com/v1?url=/frontpage
What does “No environment client configured to support domain name for source entity url /relative-url/” mean?If you are using relative URLs (e.g. /about-us/) and are trying to test the schema by making a CURL request, you might have seen this error message.The reason for this is that the URL doesn’t have a domain that matches an environment client. Environment clients need to be able to match the URL in the source entity with the hostname provided for the environment client.The best way to solve this is to use absolute URLs in your schema (e.g. https://my-domain.com/about-us/).If you however want to use relative URLs, it can be done by adding a domain to your environment client with the hostname root.tld.
Your handles work, but your URL routes are missing?A URL route is only created if the hostname in the source entity’s URL is already registered as a hostname on a domain at the moment the content is processed. If no matching hostname exists at that point, the URL route is skipped, and no error is returned. Handles are not affected - handle routes are created regardless of your domain setup.Adding the domain afterwards does not create the missing routes. Nothing rebuilds routes for content that has already been processed. To fix it, register the hostname(s) first, then deploy the schemas in each affected environment so the content is reprocessed. A Published environment with its own data source needs its own deployment.This is not the same problem as the relative-URL message above, and the fixes are different:
  • Relative URLs (e.g. /about-us/) that can’t be matched - add the root.tld hostname. Note that root.tld is resolved when the content is processed, just like any other hostname, so content that was already processed without it still has to be processed again.
  • Absolute URLs whose routes were never created - root.tld won’t help. The actual hostname has to be registered on a domain, and the content has to be processed again afterwards.
See Domains & hostnames for the full explanation.

Handle

Handle differentiates a bit from URL routing. A handle can be whatever you would like. In this example, a navigation structure is returned. The schema returns an array of navigation items and utilizes the lookup and reference fields. This handle would be called like this: https://delivery.enterspeed.com/v1?handle=mainNavigation