Class DeliveryApiSettings
Typed configuration options for Delivery API settings.
Inheritance
Namespace: Umbraco.Cms.Core.Configuration.Models
Assembly: Umbraco.Core.dll
Syntax
[UmbracoOptions("Umbraco:CMS:DeliveryApi")]
public class DeliveryApiSettings
Properties
View SourceAllowedContentTypeAliases
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.
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 |
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.
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 |
|
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 |
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 |
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 |
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 |
|
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 |
|
Methods
View SourceMemberAuthorizationIsEnabled()
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.