Web service routes

Sitefinity CMS exposes it's data via OData services. As in the OData flow, Sitefinity CMS allows the registration of one or more routes to handle client requests.

The URL of the web service is composed from the URL of the route and the URL of the service.

EXAMPLE: Each available resource can be found via the following URL convention: <www.yoursite.com>/<RouteUrlName>/<ServiceUrlName>/<TypeUrlName>

Sitefinity CMS has the concept of a default route. The backend UI for service exposure depends on this property, because it allows the management of the services for a single selected route.

By default, Sitefinity CMS has a single route installed under the /api URL. You can change the URL name of the route, if it conflicts with any existing APIs.

IMPORTANT: When making requests to the service include the following header in the request: X-SF-Service-Request: true.
It is needed to successfully call protected services and not receive 401(Unauthorized)

Each route has a UrlName property and a Name property. The UrlName of the route is the first segment in the URL that is used to build up the full URL.

NOTE: UrlName property must be unique and does not allow special characters or multiple segments.

You can change the URL of the service when you create or edit it. You can change the URL of the route in the Advanced setting of the web services module.

To change the name or the URL of the route, perform the following:

  1. Navigate to Administration » Settings » Advanced » WebServices » Routes » Frontend.
  2. In Route name, enter a user friendly name for the route.
  3. In UrlName, enter the new URL of the route.
  4. Click Save changes.

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

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its 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 .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

Batch requests