Class ApiDocumentUrlService
Default implementation of IApiDocumentUrlService that retrieves document information by URL route.
Inheritance
object
Namespace: Umbraco.Cms.Core.DeliveryApi
Assembly: Umbraco.Core.dll
Syntax
public sealed class ApiDocumentUrlService : IApiDocumentUrlService
Constructors
View SourceApiDocumentUrlService(IDocumentUrlService)
Initializes a new instance of the ApiDocumentUrlService class.
Declaration
public ApiDocumentUrlService(IDocumentUrlService documentUrlService)
Parameters
| Type | Name | Description |
|---|---|---|
| IDocumentUrlService | documentUrlService | The document URL service. |
Methods
View SourceGetDocumentKeyByRoute(string, string?, bool)
Gets the document key (unique identifier) for the specified route.
Declaration
public Guid? GetDocumentKeyByRoute(string route, string? culture, bool preview)
Parameters
| Type | Name | Description |
|---|---|---|
| string | route | The URL route to look up. |
| string | culture | The culture to use for the lookup, or |
| bool | preview | Whether to include unpublished preview content in the lookup. |
Returns
| Type | Description |
|---|---|
| Guid? | The document key if found, or |