Configure the Types of a service

Each service may include one or more content types. You cannot add one and the same type twice in a service.

Select the types included in the service 

Under This service provides access to..., you can configure which content types are included in the service and which of their fields are exposed.

NOTE: In case the content type uses Related media custom fields, make sure the respective media - ImagesDocuments, or Videos are enabled on the Web service module. Otherwise, the custom fields are not displayed.

By leaving all types selected, you are setting the AutoGeneration property of the service to true. It controls how the types to the service are added. If it is set to true, the types of the service will be automatically populated from out-of-the-box Sitefinity CMS recommended types and their properties.
This means that every newly added or removed custom field or dynamic type will be automatically added or removed from this collection. The changes to the configuration are reflected immediately after a save action occurs. An exception is the navigation property for comments, whose AutoGeneration mode depends on the configuration in the Comments module. A change to the comments settings require an application restart.
You can turn off auto-generation from the Advanced configuration of types.

To configure the types that are exposed by the service, select the types included in the service by performing the following:

  1. Under This service provides access to..., click Change.
    A list of all supported content types appears.
  2. Select the content types that you want to be included in the service.

    NOTE: When excluding some types, you can decide whether to set the AutoGeneration property to false. This means when a new type is created, it will not be automatically reflected in the service. You have to manually maintain the collection of types.

  3. To do this, deselect Automatically select newly created content types checkbox.

  4. Click Done.

Change the URL of a type 

If you want to change the auto-generated URL of the type, click the URL of the type and enter the new one.
This way, you set the UrlName property of the type, which is the third segment in the URL that is used to build up the full URL. This property is unique per service.

Select the fields that each type exposes

After you choose which type to include in the service, for each selected type, you can configure which fields you want to include and what properties each field would have, such as sorting or filtering.

Perform the following:

  1. At the bottom of This service provides access to..., click Advanced.
  2. In column FIELDS, click All link of the type that you want to configure.
    The fields of the content type appear.
  3. Select the fields that you want to include.
  4. For each selected field, choose whether you want to allow filtering or sorting, or both.

    NOTE: When excluding some types, you can decide whether to set the AutoGeneration property to false. This means when a the fields of a type change, this will not be automatically reflected in the service. You have to manually maintain the collection of types and their fields.

  5. To do this, deselect Automatically select newly created fields checkbox.
  6. Click Done.

NOTE: Some fields are non-editable fields and can only be set on insert and not update. This is required as there are properties like the UrlName of a library, which upon change requires the recalculation of the URLs of all the images, videos, and documents below it. As such operations are resource consuming, the values of such properties cannot be updated with a simple update request. These properties include UrlName of image, video, and document libraries. 

Change the access permissions of a type

If you want to set individual access level for a content type that is different that the access level, you set for the entire web service, click Advanced.
In the ACCESS dropdown box, select the desired access level for each individual content type.

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?