Search Results for

    Show / Hide Table of Contents
    View Source

    Class DeliveryApiSettingsExtensions

    Provides extension methods for determining whether content types or content items are allowed to be exposed through the Delivery API based on the configured allow and disallow lists.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class DeliveryApiSettingsExtensions

    Methods

    View Source

    IsAllowedContentType(DeliveryApiSettings, string)

    Determines whether a content type alias is allowed to be exposed through the Delivery API.

    Declaration
    public static bool IsAllowedContentType(this DeliveryApiSettings settings, string contentTypeAlias)
    Parameters
    Type Name Description
    DeliveryApiSettings settings

    The Delivery API settings.

    string contentTypeAlias

    The content type alias to check.

    Returns
    Type Description
    bool

    true if the content type is allowed; otherwise, false.

    Remarks

    If the allow list is configured (non-empty), only content types in the allow list are permitted. The allow list takes precedence - if a content type is in both allow and disallow lists, it is allowed. If the allow list is empty, all content types are allowed except those in the disallow list.

    View Source

    IsAllowedContentType(DeliveryApiSettings, IPublishedContent)

    Declaration
    [Obsolete("Please use the overload of IsAllowedContentType taking a content type alias. Scheduled for removal in Umbraco 19.")]
    public static bool IsAllowedContentType(this DeliveryApiSettings settings, IPublishedContent content)
    Parameters
    Type Name Description
    DeliveryApiSettings settings
    IPublishedContent content
    Returns
    Type Description
    bool
    View Source

    IsDisallowedContentType(DeliveryApiSettings, string)

    Declaration
    [Obsolete("Please use IsAllowedContentType and negate the result instead. Scheduled for removal in Umbraco 19.")]
    public static bool IsDisallowedContentType(this DeliveryApiSettings settings, string contentTypeAlias)
    Parameters
    Type Name Description
    DeliveryApiSettings settings
    string contentTypeAlias
    Returns
    Type Description
    bool
    View Source

    IsDisallowedContentType(DeliveryApiSettings, IPublishedContent)

    Declaration
    [Obsolete("Please use IsAllowedContentType and negate the result instead. Scheduled for removal in Umbraco 19.")]
    public static bool IsDisallowedContentType(this DeliveryApiSettings settings, IPublishedContent content)
    Parameters
    Type Name Description
    DeliveryApiSettings settings
    IPublishedContent content
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX