Predefine semantic URLs

You can use the type methods functionality to predefine semantic URLs to handle requests.

EXAMPLE: You may not want to query a service via the following oData query string:
/api/default/newsitems?$filter=startswith(Title, 'test')
In this case, you could map the URL to the following URL:

This way, you can define URLs that are easier to read and use.

To define a semantic URL, perform the following:

  1. Navigate to Administration » Settings » Advanced » WebServices » Routes.
  2. Select the route to your service and click Services.
  3. Select the service and select the type, where you want to register a new type and click Types.
  4. Select the type where you want to define a method and click Predefined methods » Create new.
  5. In Name, enter the semantic URL
  6. In Querystring, enter the original oData query string for which you want to define a more user-friendly URL
  7. Save your changes.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?