Search Results for

    Show / Hide Table of Contents
    View Source

    Class DeliveryApiSettings

    Typed configuration options for Delivery API settings.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Configuration.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [UmbracoOptions("Umbraco:CMS:DeliveryApi")]
    public class DeliveryApiSettings

    Properties

    View Source

    AllowedContentTypeAliases

    Gets or sets the aliases of the content types that are exclusively allowed to be exposed through the Delivery API. When configured, only content of these types will be returned from Delivery API endpoints and added to the query index.

    Declaration
    public ISet<string> AllowedContentTypeAliases { get; set; }
    Property Value
    Type Description
    ISet<string>

    The content type aliases that are allowed to be exposed.

    Remarks

    When this setting is configured (non-empty), it takes precedence over DisallowedContentTypeAliases. If a content type alias appears in both lists, the allow list wins and the content type will be exposed. If this setting is empty, all content types are allowed except those in DisallowedContentTypeAliases.

    View Source

    ApiKey

    Gets or sets the API key used for authorizing API access (if the API is not publicly available) and preview access.

    Declaration
    public string? ApiKey { get; set; }
    Property Value
    Type Description
    string

    A string representing the API key.

    View Source

    DisallowedContentTypeAliases

    Gets or sets the aliases of the content types that may never be exposed through the Delivery API. Content of these types will never be returned from any Delivery API endpoint, nor added to the query index.

    Declaration
    public ISet<string> DisallowedContentTypeAliases { get; set; }
    Property Value
    Type Description
    ISet<string>

    The content type aliases that are not to be exposed.

    Remarks

    If AllowedContentTypeAliases is configured (non-empty), this setting is ignored.

    View Source

    Enabled

    Gets or sets a value indicating whether the Delivery API should be enabled.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    bool

    true if the Delivery API should be enabled; otherwise, false.

    View Source

    Media

    Gets or sets the settings for the Media APIs of the Delivery API.

    Declaration
    public DeliveryApiSettings.MediaSettings Media { get; set; }
    Property Value
    Type Description
    DeliveryApiSettings.MediaSettings
    View Source

    MemberAuthorization

    Gets or sets the member authorization settings for the Delivery API.

    Declaration
    public DeliveryApiSettings.MemberAuthorizationSettings? MemberAuthorization { get; set; }
    Property Value
    Type Description
    DeliveryApiSettings.MemberAuthorizationSettings
    View Source

    OutputCache

    Gets or sets the settings for the Delivery API output cache.

    Declaration
    public DeliveryApiSettings.OutputCacheSettings OutputCache { get; set; }
    Property Value
    Type Description
    DeliveryApiSettings.OutputCacheSettings
    View Source

    PublicAccess

    Gets or sets a value indicating whether the Delivery API (if enabled) should be publicly available or should require an API key for access.

    Declaration
    public bool PublicAccess { get; set; }
    Property Value
    Type Description
    bool

    true if the Delivery API should be publicly available; false if an API key should be required for access.

    View Source

    RichTextOutputAsJson

    Gets or sets a value indicating whether the Delivery API should output rich text values as JSON instead of HTML.

    Declaration
    public bool RichTextOutputAsJson { get; set; }
    Property Value
    Type Description
    bool

    true if the Delivery API should output rich text values as JSON; false they should be output as HTML (default).

    Methods

    View Source

    MemberAuthorizationIsEnabled()

    Gets a value indicating if any member authorization type is enabled for the Delivery API.

    Declaration
    public bool MemberAuthorizationIsEnabled()
    Returns
    Type Description
    bool
    Remarks

    This method is intended for future extension - see remark in DeliveryApiSettings.MemberAuthorizationSettings.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX