MD

Resource

canonical/resource.md

Resource

Purpose

A Resource describes data associated with another structure.

Resources may be used to define available resources or to reference a specific resource.

The Canonical Data Model defines the structure of a Resource but does not define the available Resource types.

Storage ownership is separate from application ownership. A service may own the object or document that refers to a Resource, while Storage owns the Resource bytes and canonical Resource metadata.

---

Structure

A Resource consists of:

The interpretation of content is determined by type.

When a Resource references stored bytes, content may be represented by retrieval information rather than embedded bytes. That retrieval information must not expose Storage's internal filesystem path or backing implementation.

Stored byte Resources additionally expose metadata:

---

Characteristics

Resource immutability means a Resource identifier must not be reused for different content. Replacing content creates a new Resource. A service that owns a document, object, attachment, avatar, or other domain structure decides which Resource is current for that structure.