UDI Identifiers
Umbraco uses Unique Document Identifiers (UDIs) to reference most object types, such as content, media, and members. A UDI contains all the metadata needed to retrieve an Umbraco object and is readable within text.
Example:
UDIs are commonly used in Umbraco’s querying and management APIs.
Format
A UDI consists of three parts:
Scheme:
umb://
– Identifies as an Umbraco UDI.Type:
document
– Specifies the object type (for example, media, member, Data Type, and so on).GUID Identifier:
4fed18d8c5e34d5e88cfff3a5b457bf2
– A unique identifier for the object (a GUID without dashes).
Usage
UDIs are useful for retrieving content, media, or other Umbraco objects through the API. Below are examples of how to use a UDI in C# to get content or media.
Retrieving Content by UDI
You can retrieve a content item using IContentService
:
UDI Types
There are two types of UDIs in Umbraco:
GUID UDI
Used for objects that have a GUID identifier, such as content and media.
String UDI
Used for objects that are not GUID-based, such as dictionary items.
Last updated
Was this helpful?