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:
/api/default/newsitems/filtered
This way, you can define URLs that are easier to read and use.
To define a semantic URL, perform the following:
- Navigate to Administration » Settings » Advanced » WebServices » Routes.
- Select the route to your service and click Services.
- Select the service and select the type, where you want to register a new type and click Types.
- Select the type where you want to define a method and click Predefined methods » Create new.
- In Name, enter the semantic URL
- In Querystring, enter the original oData query string for which you want to define a more user-friendly URL
- Save your changes.
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
Get started with Integration Hub | Sitefinity Cloud
This free lesson teaches administrators, marketers, and other business professionals how to use Sitefinity Integration Hub to create automated workflows between Sitefinity and other business systems.
Web Security for Sitefinity Administrators
This free lesson teaches administrators the basics about protecting your Sitefinity instance and your sites from external threats. 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 ASP.NET Core and take advantage of its decoupled architecture and modern development model.